Website logo map related and performance optimization stories

Source: Internet
Author: User
Keywords This background performance optimization in fact

Inexplicable source of –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 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 ways, each has its own means, each has its own purpose, to meet the king.

Fabricated theme –logo and website http://www.aliyun.com/zixun/aggregation/14109.html "> 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?)

Logo: First time show logo and background, avoid blank and no background; Merge background map to Logo: reduce page request; Optimize compression logo: Reduce file size as much as possible; Specify alternate text for logo in IMG: increase page availability 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 for logos? : This really can't!! Use long cache!!!

1. Pre-loading Logo: First time display logo and background, to avoid blank and no background
The way 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= '/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.

<h1> <a title= "Go to Google Home" href= "http://www.google.com/webhp?hl=en" id= "logo" >google<img Width= "164" height= "alt=" "src="/images/nav_logo8.png "/></a></h1>

"

True:

In this way, that way:

And that's the end of it:

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

first, the PNG8 format is preferred (stop, no one knows!) Second, fireworks are better than Photoshop, and the volume is smaller. Finally, with special compression tools (such as pngoptimizer) compression without this tool? Install Firebug in Firefox and Reload page speed, performance analysis, direct storage compression good diagram too complex? 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 a!!!.
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? 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 percent)

Small knot: Easier, refactoring is an attitude. Many innovations are just the ingenious combination and use of things.

Reference:
HTML4) headings:the H1, H2, H3, H4, H5, H6 elements
HTML5) The section element can set multiple H1

Optimizing Browser Rendering
Web Configured Best Practices

"High-performance website construction Guide" after reading impressions
Yslow:best practices for speeding up Your Web Site

Source: http://isd.tencent.com/?p=2233

Related Article

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.