Shanghai Longfeng start from the details of compressed file size

Optimization of

GZIP is a file compression program, the compression ratio of at least 40%, the highest even reached 80%. It can be opened for use in the IIS and Apache server, as for how to open the key GZIP compression is not discussed in this paper, no longer repeat. It is noted that the open GZIP compression may lead to IIS spiders index log return code 200064, see the article "IIS log analysis 200064 whether the site is K precursor".

, open GZIP compression

by skipping mode of backward compatibility, such as the definition of document type code can use the "DOCTYPE! HTML", instead of the traditional DTD statement, this way not only for backward compatibility, but not for you to save 150 characters. In addition, DIV+CSS save Table code than the page layout, so the choice of who, needless to say. At the same time should avoid unnecessary comments. From the word to the external paste content, pay attention to the removal of the redundant code in the source code under the state for long, should be a reasonable paging. Of course, can also use the similar web page file compressor tool removal HTML redundant code, but people still tend to manually remove. For >

Optimization of

three, HTML, JS, CSS code

In addition to the

Lao Tzu Taoist saying "the world will be in fine, the world will be difficult to easy". A common sense tells us, only to grasp and diligently on the details of the pursuit, it may create the state, enterprises, or personal success. So is Shanghai dragon, there are too many details we need to grasp, to optimize the size of the page is one of them.

, mainly from the picture itself. Try to use JPEG, GIF, PNG and other relatively small picture format, also can use PS or Jpeg imager compression tools to compress images. FLASH, video and audio files can be compressed using professional tools. In addition, should also play flash, such as video and audio files of the control code optimization. For example, in the choice of control code attributes, should comply with the principle of minimization, can meet the basic needs, deleting unnecessary attributes and code notes.

two, FLASH, pictures, video and audio etc.Optimization for pictures of

bandwidth, CPU processing speed, size of the page is a page open speed variable bearing. Therefore, the web page size is directly related to the user experience. At the same time, "a direct impact on the size of the spider crawling efficiency, web page file is smaller, per unit time spiders index pages may be more, which included the number may be more. The importance of "the remarkable file size. How to effectively compress the web page file size? Mainly from the following details.

Leave a Reply

Your email address will not be published. Required fields are marked *