Website speed is a very important indicator of websites. Today, let's introduce three speed testing tools commonly used by Hunk for foreign trade websites, and make a case study of speed optimization for a website
be careful
All test results can only be used as reference. The test results of different platforms may also be different. The test results of the same platform at different times may also be different, because the network is volatile, which is normal.
In addition, these are foreign test platforms that can only be used to test foreign trade websites, and Chinese websites are not applicable.
The contents of this article are as follows
1. gtmetrix, a speed measuring tool for foreign trade websites
Official website: Gtmetrix.com
Gtmetrix is mainly used to score the website pages comprehensively, including common image size, page size, request, loading time, etc., and give corresponding prompts.
It should be noted that its speed test is not very accurate, mainly depending on the page rating and improvement suggestions.
2. The webpagetest of foreign trade website speed measurement tool
Official website: Webpagetest.org
In addition to testing the website's opening speed, page size and number of requests, the website also scores the website's response speed and page quality, and also prompts the page loading requests and 404 links
3. Dotcom tools, a speed measurement tool for foreign trade websites
Official website: dotcom-tools.com/website-speed-test.aspx
This website is to test the time when you open your website in various regions of the world, and you can see how fast your website is in the world
4. Case analysis of foreign trade website speed measurement
Case website: https://www.kingsunlights.com/
Website space: Bluehost
Website type: wp website+the7 theme
First, open the three websites mentioned above, enter the case website, press Enter, start the test, wait about one minute, and all the tests will be completed
Then look at the test results
Gtmetrix test results are as follows
It can be seen that the page size, consultation and loading time are within the normal range (if the suggested range is exceeded, the arrow will turn red), but the pagespeed score and yslow score are not high. We mainly look at the hints of pagespeed and look down
Four parameters in Pagespeed scored extremely low, which is also a common problem on many foreign trade websites
1)Optimize images
This item refers to the optimization of pictures. Many friends upload pictures directly to the website after they have done a good job. No matter how big the pictures are, they do not compress them, which will slow down the website
Click this item, the following prompt will appear, indicating that the compressed image can save about 165K in size, and then the following list will indicate the images that can be compressed and the optimized version.
At this time, you need to click on the optimized version, download the pictures, and replace the pictures that prompt you to improve one by one
2)Leverage browser caching
This is to increase the browser cache. How to solve this problem? Put the cursor on what's this mean, and a prompt will appear. Click read more
Find the following code, copy and paste it into the. htaccess file in your space, and then connect it to the original file. If you don't know where the htaccess file is, you can refer to Use of yoast seo plug-in
Of course, the htaccess file only has the apache server (common shared spaces, such as Bluehost, use this type). If you use the vps+nginx server, you need to modify the vhost system file of your website, and add the following code in the server section
location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
expires max;
log_not_found off;
}
You can also solve this problem
3)Enable gzip compression
Enable gzip compression, open the learn more again, find the following code and put it in the htaccess file
If the website uses vps+nginx server, just add the following code to http {} in nginx. conf file, and restart nginx to fix this problem
gzip on;
gzip_disable “msie6”;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
4)serve scaled images
Setting the correct image size will greatly help the website speed
What is the correct size? That is, the original image location is 300X300px, but the image you put has 500X500px, which is a waste. If there are many such cases, it will greatly slow down the website. The specific contents can also be referred to Avada Pictures
Click this item to see which pictures have the incorrect size and what the corresponding correct size is. Just download these pictures locally, process them to the correct size, and then upload and replace the old pictures to fix this problem
5)Defer parsing of javascript
This means delaying the loading of JS files to ensure user experience.
This problem is complicated. One is due to inappropriate theme settings, and the other may be due to too many plug-ins. Therefore, gtmetrix only gives suggestions without specific solutions.
To solve this problem, you need to install a cache plug-in, such as the wp bucket plug-in. Please refer to Detailed setting method of wp bucket
The webpagetest results are as follows
The results of webpagetest indicate the following problems
1)First Byte time
This is the response time that users need to wait when they open and enter your website. The shorter the response time, the better.
This data is generally determined by your server. From Hunk's experience, siteground Or LINODE is much shorter than BLUEHOST.
In addition, installing cache plug-ins can also solve this problem.
2)Cache static content
That is, page cache
The function of cache is to handle the content of the page first. When the user comes to visit it, it will be downloaded directly, without calling data, so the speed will be improved
Generally, it can be solved by adding cache plug-ins.
3) Loading time
It can be seen that the test result of webpagetest is slower than that of gtmetrix. Who is accurate? Wait until you compare it with the third test result.
Dotcom tools test results
It can be seen that the global speed is not very good, and the average load time has reached 15S. The result of this test is close to the result of webpagetest.
Updated on October 13, 2019 , ha ha, www.kingsunlights.com This site may have seen my article, and now the space has changed to what I recommend Fast siteground space , much faster.
summary
The above is the test results of three foreign trade station speed measurement websites. These three websites have their own advantages and complement each other, which can help us understand the speed of the website and the speed optimization of the page intuitively.
However, there is no need to worry too much about the test results of the website. As long as the speed is relatively fast, there is no big problem with other items. For example, pagespeed score, it is difficult to get 100 points, and it is unnecessary to get 100 points.
Of course, some contents cannot be tested, such as the number of plug-ins. Please refer to my other article N ways to speed up websites