For web designers, the speed of access to a website is even more important than the content. Even if the content of the site is excellent, but if the access speed is slow, I believe that not many people will have the patience to wait. The figures in the illustration of the article are the comparison chart of the data before and after losing weight on my blog.
1: Use Gzip to compress documents: Gzip encoding is used to improve the performance of web pages, not only to reduce storage space, but also to reduce the time required for transmission. Using Gzip to compress the files on your website can significantly increase the loading speed of your web pages and also reduce your website's bandwidth consumption. (Using this method will increase the burden on the server, as it requires modifying the server configuration, which is not operable for web hosting users.)
Further reading.
2:CSS Compression Weight Loss Tool
Copy the CSS code of your website into this box, click on compress, you can generally compress the CSS 1-5k.
3:Give JavaScript files to lose weight: this method is different from the Gzip compression function, there are many ways to reduce JavaScript documents.
4: Put the style sheet files in external calls: Put the JavaScript and CSS style sheet files you need to use in the page in another folder, so that when you open other pages of the site will cache these calls, thus speeding up the loading speed of the website page.
5: Try to use GIF format for website images, GIF format images take up little space, for example, the illustration of my blog, JPG format images are generally between 10-50K, and GIF format images are generally less than 10K.
6:Try not to call too big flash files and video files on the homepage.
7:Avoid using web page redirects: either through server-side redirects or content redirects through JavaScript code, the site will first load a blank page, and then redirect to another page, which not only prolongs the page loading time, but also is likely to lead to not jump, so that the user is facing a "blank"! " page. Further reading: how to properly use web redirects
8:Put the statistic code at the bottom of the website: Don't put it in the same table or div with the page content. You can put the statistic code directly at the bottom of the page, or make a separate table or div at the bottom of the page to place the counter. This way, your site's speed will not be affected in the slightest when the counter is not accessible.