generally speaking, the acceleration of websites is considered by most people as the responsibility of back-end developers and systems management. This view is not entirely correct because a high-performance web site depends not only on the back end of the site, but also on the front end of the site, that is, it relies on both the artist and the front-end developer.
in fact, as far as the current network environment is concerned, when we browse the normal web sites, the 10-20%, which is usually time consuming, is used at the back end, and the remaining 80-90% is consumed by the front end. So, if you plan to speed up your site, you might want to get the artists and front-end developers to consider the following aspects as well as optimizing the back end. I believe you may sigh, little knife Ge can effectively enhance the site’s performance.
1. reduces the number of HTTP requests as much as possible. For example: use a picture instead of multiple pictures, and then use the CSS display.
2. uses CDN to speed up websites. CDN can greatly improve the access speed of the website without changing the original website architecture. Especially for websites that have users across the country (or around the world), the effect will be even more pronounced.
3. CSS file is placed on the head of the page. The browser must get CSS before it can display the page. Otherwise, the page cannot be displayed. So it’s wise to put the CSS file on the head of the page. Bole’s online development team has done tests on a web page that includes multiple JS files and the CSS file at the end of the page. When a user visits a web page, it is obvious that the page is blank first (downloading JS and other documents) and then showing it. Obviously, in this case, the user experience is very poor. On the contrary, if you put the CSS file at the head of the page, you can see the page first when the user is browsing the web (there is no obvious blank in the page).
4. JS file is placed at the end of the page. The reason is the same as the CSS file at the head of the page.
5. stores the CSS and JS code separately in separate web pages. Now many of the browser, such as Firefox, IE 7, 8 and so on will be pictures, CSS, JS and other external file cache in the local users, so users browse the web through the browser only transmitted the text content of the web page, to download pictures, CSS, JS and other external documents. As a result, the speed of access can naturally increase a lot. In addition, it is easy to manage CSS and JS code separately in separate page files.
6. "downsizing" for JS". Compress JS using third party tools (without manual), including deleting notes, spaces, and so on, usually around 20%. For example, not "downsizing" before the JS for 100KB, "downsizing" after 80KB.
in addition to the second, there are 5 other aspects of art and art