User Experience Design: logo and website performance optimization

Source: Internet
Author: User
Tags file size website performance

Web page Production WEBJX article introduction: website logo logo performance optimization.

Inexplicable source from the –H1
The H1 here is not a chilling H1, but a tag in HTML, an unavoidable label in the day-to-day work of a refactoring, a label that can't be ignored, a title that ranks first in the title of an HTML, and there's been a lot of discussion about H1 in history. There are also people on Twitter on the H1 debate (en), although there will be some differences, but for the importance of H1, we all have an identity, the pursuit of many, different methods, each has its own means, each has its own purpose, to meet the king.

Fabricated theme –logo and Web site performance optimization
When it comes to H1, inevitably will and SEO relationship, but also will be the site logo pull out to say things; in fact, today's heroine is not H1,seo is not a hero, the site logo is not a male and female protagonist, their story is wonderful, their relationship is not simple In fact, here just want to explain the website logo, website performance optimization related. Alas, these things have long been circulated in the past, I can not say what new ideas, just cliché, left and left, Luo listed some common sense of things. (In fact, why do these two words always appear?)

    • Pre-loading Logo: The first time display logo and background, to avoid blank and no background;
    • Merge Background map to logo: reduce page requests;
    • optimized compression Logo: Reduce file size as much as possible;
    • Specify the alternate text for the logo in IMG: Enhance page usability and compatibility;
    • Specify logo size in img: enhance browser rendering efficiency;
    • The img tag that closes the logo: improves browser rendering efficiency; )
    • Enable gzip compression on logo? : This is really not!! Use the long cache Bar!!!

1. Pre-loading Logo: The first time display logo and background, to avoid blank and no background
The way the Google is said to be rotten, the same old, in the content of the page has not been loaded before, the need to load the map: This will allow the first time to show the logo (if you do not want to show the first time logo, please ignore), there will not be bald without the background map modified content.
The following is the approach of the homepage of Google, in fact, this figure is the search results page logo and background of the merged map, the home page did not use, but to the Google home page a few people will not go to search results pages ... (Thanks for the Ghost Brother's reminder)

<body ... onload= "...; if (document.images) new Image () src= "Http://www.webjx.com/images/nav_logo8.png" ...>

2. Merge background map to logo: reduce page requests
Colleagues like Sprite (CSS sprite), this sprite is no exception. In fact, this one and the first one some repeat, in order to show the richness of the content of the article, regardless of.

 

True

In this way, in that way:

And that's the end of it:

3. Optimize compression Logo: Reduce file size as much as possible

    1. First of all, PNG8 format is preferred (don't say, no one knows!) )
    2. Second, fireworks have better compression than Photoshop and are smaller in size
    3. Finally, a special compression tool (such as Pngoptimizer) is used to compress
    4. No such tool? Install Firebug in Firefox and Reload page speed, performance analysis, direct storage compression good diagram
    5. Too complicated? Then go straight to the http://www.smushit.com/ysmush.it/, compress it online.

4. Specify the alternate text for the logo in IMG: Enhance page availability and compatibility This is going to be!!!.
Hey, forgot to say this and SEO also have a little relationship oh-.-

5. Specify logo size in img: Enhance browser rendering efficiency and say!!!
To say, this is controversial, sometimes it is not easy to maintain content, or in the CSS to specify the size is a solution.

6. Close the IMG tag where the logo is located : (I mentioned it again.
Web standards can not forget Ah, do not know how many people have read the rules of the international standard books, I did not: (Have a look at the time)
HTML 4.01 Specification
CSS 2.1 Specification

7. Enable gzip compression on logo? Let's just forget it.
For a long time will not change the logo, you can set a long cache, reduce the request to the server.
There is no use for gzip compression on the server side, but text files such as css/js/html can be, and must be allowed when server pressure is allowed (most Css/js/xml file sizes can be compressed 70-80%)

Small Summary: problem easier, refactoring is an attitude. Many innovations are just the ingenious combination and use of things.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.