Column navigation
How to improve the website opening speed
Source: Popularity: 1243 Published time: 2018-06-07 13:46:09
1.Shrink the Javascript and CSS files
If about 50-60% of your website's users are first time visitors, then these people will download Javascript and CSS, and if these files are large the browser will download for a long time。Using compression tools can reduce the size of Javascript and CSS files by up to half and improve the compression rate by at least 40% to 60%。
2.Sprites picture technology
Spriting is a kind of web image application processing, which is to include all the sporadic images involved in a page into a large image, and then use CSS technology to display。In this way, when visiting the page, the loaded picture will not be slowly displayed as before, which can reduce the size of the image of the entire page, and the use of CSSSprites can well reduce the http request of the page, thus greatly improving the performance of the page。CSSSprites in the country many people called css sprites, very early, in many large websites are useful, especially some of the ICONS that exist on all pages are used more, very good to improve the loading speed。
3.Try to use the GET method for Ajax calls
When you actually use XMLHttpRequest, if implemented using the POST method, 2 HTTP requests will occur, while only 1 HTTP request will occur using the GET method。If you switch to the GET method, HTTP requests are reduced by 50%!
4.Delay the display of content outside the visible area
In order to ensure that users can see the visible area more quickly, Web pages can be delayed to load or display content outside the visible area, and to avoid page distortion, you can use placeholder labels to specify the correct height and width。For example, WP's jQueryImage LazyLoad plug-in can not load any image information below the first screen when the user stays in the first screen, only when the user scrolls the mouse down, these images begin to load。This significantly improves the loading speed of the visible area and improves the user experience。
5.Fair use Flush
After the client sends a browsing request,It typically takes 200-500ms to process these requests on the server side,During this period,The client browser is in the waiting state,If you want to reduce user waiting time,flush can be used where appropriate,Push the ready content to the client,This is easy to achieve in php for example: website load time website access speed Website user experience。
6.Compact code
This can be said to be a direct method, and it is also used more, to slim down the web code, delete unnecessary heavy redundant code, such as unnecessary Spaces, line breaks, comments, etc., including the useless code in the JS code also needs to be cleared。Some people may have misunderstandings about the clearance of the comment code, and even some stack keywords in it。
- Previous post: Enterprise website construction is expensive or cheap
- Next post: What are the misunderstandings of website construction