MENU service case
 Website construction website design Beijing website construction high-end website production company Shangpin China
We create by embracing change
360 ° brand value__
simplified Chinese character
Simplified Chinese English

Shangpin China Joins Hands with Beisheng Internet to Create a New Chapter in Website Construction

Type: Shangpin Dynamic Learn more

High performance website construction - CSS summary

Source: Shangpin China | Type: website encyclopedia | Time: July 9, 2019

Some platforms of Shangpin China need to optimize the access speed. The general direction is to deal with caching, compression, request reduction and other aspects. Not only do we need to have a certain understanding of the network, but also need to have some understanding of the browser mechanism and front-end technology. In this process, The golden rule of performance summarized is that only 10%~20% of the end user response time is spent on downloading HTML documents. The remaining 80%~90% of the time is spent on all components in the download page.

1. Reduce HTTP requests, image maps, CSS sprites, inline images and scripts, scripts and stylesheets.

2. Use CDN( Beijing website construction Content publishing network).

3. Add Expires headers and revise file names, such as adding version numbers to files that often need to be changed.

4. Compress components, that is, reduce the corresponding size of HTTP to reduce the response time.

5. Put the style sheet on the top to reduce the "Blank White Screen" phenomenon, and try to use the LINK tag to put the style sheet in the document HEAD.

6. Place the script at the bottom and download it in parallel. The script is blocked.

7. Avoid CSS expressions, use "one-time expressions" and event handlers.

8. Use external JavaScript and CSS. In pure terms, inline is faster than external. Download after loading.

Some platforms need to optimize the access speed. The general direction is to deal with caching, compression, request reduction and other aspects. Not only do we need to have a certain understanding of the network, but also we need to have a little understanding of the browser mechanism and front-end technology. In this process, The golden rule of performance summarized is that only 10%~20% of the end user response time is spent on downloading HTML documents. The remaining 80%~90% of the time is spent on all components in the download page.

1. Reduce HTTP requests, image maps, CSS sprites, inline images and scripts, scripts and stylesheets.

2. Use CDN

3. Add Expires headers and revise file names, such as adding version numbers to files that often need to be changed.

4. Compress components, that is, reduce the corresponding size of HTTP to reduce the response time.

5. Put the style sheet on the top to reduce the "Blank White Screen" phenomenon, and try to use the LINK tag to put the style sheet in the document HEAD.

6. Place the script at the bottom and download it in parallel. The script is blocked.

7. Avoid CSS expressions, use "one-time expressions" and event handlers.

8. Use external JavaScript and CSS. In pure terms, inline is faster than external. Download after loading.

(Implemented by cookie technology)

9. Reduce DNS lookups, DNS cache and TTL.

10. Simplify JavaScript.

Confusion and saving, (tools: JSMin and Dojo Compressor),

Gzip and Minification,

To simplify CSS, the biggest saving comes from optimizing CSS - merging the same classes, removing unused classes. The best solution is to remove comments and spaces, and perform some intuitive optimization, such as using abbreviations ("# 606" instead of "# 660066") and removing unnecessary strings ("0" instead of "0px").

11. Avoid redirection.

Lack of slash at the end: There is a redirect that is most wasteful and occurs frequently, but Web developers are usually unaware of it. That is, "the slash at the end is missing". E.g. access //xx.com/xxx Will result in a 301 response, including a //xx.com/xxx/ Redirection of. Of course, redirection will not occur if the ending slash is missing after the host name, such as access //baidu.com , but the final URL seen in the browser still contains a slash at the end. The reason for the automatic slash is that the browser must specify some paths when making a GET request. If there is no path, it will simply use the document root (/).

To connect to a website, the simplest way for users to transfer from an old URL to a new URL is redirection. Redirection can be avoided through Alias, mod_rewrite, DirectorySlash, and direct link code.

(css)

Tracking internal traffic. Redirection is often used to track the flow of user traffic. Another option is to use the Referer log to track the flow. Each HTTP request contains a URL indicating the page from which the request originated, that is, the reference (sometimes there is no reference page, such as when the user types a URL or uses only bookmarks). For internal traffic, that is, traffic between websites of professional website construction companies, it is worthwhile to avoid redirection by establishing referer logs to save the corresponding time of end users.

Track outbound traffic.

12. Remove the duplicate script.

13. Configure ETag. Entity Tag is a mechanism used by Web server and browser to confirm the validity of cache components.

14. Make Ajax cacheable.

Others: packet capture detection tools, such as IBM Page Detailer and HttpWatch, understand that SSL is responsive and cacheable. YSlow level is a strong indicator of page response. YSlow is combined with FireBug.

Source Statement: This article is original or edited by Shangpin China's editors. If it needs to be reproduced, please indicate that it is from Shangpin China. The above contents (including pictures and words) are from the Internet. If there is any infringement, please contact us in time (010-60259772).
TAG label:

What if your website can increase the number of conversions and improve customer satisfaction?

Make an appointment with a professional consultant to communicate!

* Shangpin professional consultant will contact you as soon as possible

Disclaimer

Thank you very much for visiting our website. Please read all the terms of this statement carefully before you use this website.

1. Part of the content of this site comes from the network, and the copyright of some articles and pictures involved belongs to the original author. The reprint of this site is for everyone to learn and exchange, and should not be used for any commercial activities.

2. This website does not assume any form of loss or injury caused by users to themselves and others due to the use of these resources.

3. For issues not covered in this statement, please refer to relevant national laws and regulations. In case of conflict between this statement and national laws and regulations, the national laws and regulations shall prevail.

4. If it infringes your legitimate rights and interests, please contact us in time, and we will delete the relevant content at the first time!

Contact: 010-60259772
E-mail: [email protected]

Communicate with professional consultants now!

  • National Service Hotline

    400-700-4979

  • Beijing Service Hotline

    010-60259772

Please be assured to fill in the information protection
Online consultation

Disclaimer

Thank you very much for visiting our website. Please read all the terms of this statement carefully before you use this website.

1. Part of the content of this site comes from the network, and the copyright of some articles and pictures involved belongs to the original author. The reprint of this site is for everyone to learn and exchange, and should not be used for any commercial activities.

2. This website does not assume any form of loss or injury caused by users to themselves and others due to the use of these resources.

3. For issues not covered in this statement, please refer to relevant national laws and regulations. In case of conflict between this statement and national laws and regulations, the national laws and regulations shall prevail.

4. If it infringes your legitimate rights and interests, please contact us in time, and we will delete the relevant content at the first time!

Contact: 010-60259772
E-mail: [email protected]