A fast page speed is something every single site owner wants, while there are several reasons why your site could be slow but one of the most oversight reasons for slow website speed is too many HTTP requests and high transfer size. In this article, we are going to know what are HTTP requests and how you can reduce request count for faster WordPress website speed and happy visitors.
What are HTTP requests and why they matter?
Whenever someone visits your website or some page of your website, in order to show the content to the visitor, the visitor’s browser sends a request to the server to let it load all the content of that website page that the user wants to see. The server process that requests and sends that data to the browser and the browser renders content in visitors’ browser.
Since all these files are requested individually, it is obvious the number of files is requested from the server number of times the server sends back these files, and the higher the file number higher the request count. Too many of these requests can slow down your site drastically. Not just the number of these files, the size of these files can also make a huge impact on the site.
How to find request count and size?
Now the question how you can find and identify these requests? There are several different free tools available from which you can check the request count and data transfer size of your website’s page. Few popular ones are mentioned below.
- Chrome Developer tools
- Lighthouse (browser-based and CLI)
- GTMetrix and Pingdom (Web-based tool)
- Query Monitor (WordPress Plugin)
All these tools work in the same way they may show data a little differently but the actual data will stay the same. After running your website on any of these tolls you can get exactly how many requests your website page is requesting, what is the size of these requests, what are the files are being requested, how much time the server takes to fulfill these requests, and which request impacting the most on your site?
You need to check these matrixes for every single page of your website to properly identify the request count and transfer rate. But the most important page is your home page, the faster the homepage is higher the chances of visitors to spend time on your website.
How to increase performance?
Now the next thing is to actually reduce these request counts and transfer size. For reducing the request count and size you don’t actually need to add fewer images and less dynamic content on your website nor you have to remove animation and stuff. There are several different methods by which you can reduce the request count and increase the performance of your website.
Now there are two major things, the overall request count and the size of these requests and we are addressing both of these things one by one.
How to reduce request count?
By reducing the request count on your website you can make your website 10% to 20% faster than before. To reduce the request count we can do few things which are mentioned below.
1. Delete unnecessary images
Having some good images on your website is crucial to properly represent your website, images are visual representations of your website and they speak much more and louder than any text of the site. But there are very high chances of having an unnecessary amount of images on your website. Including those images which are stored on your site but you are not using right now remove them.
Another thing that you can do is remove multiple layers of images for a single static representation, you can combine them and make a single image for faster loading time.
2. Delete unnecessary files
Now when you run a test on your site which we have mentioned above. You will be surprised to know that more than images many unknown files are being requested from the server. Like some files from any free social media plugins or some embedded videos are taking too much time to process.
Now If find anything unnecessary files on your site and you think it is causing bloat, scrap it. This also includes the plugins and themes you’ve installed and not using at the moment.
4. Enable lazy load
Lazy loading for your webpage is another amazing option to reduce HTTP requests on the page. With lazy load, only a visible part of the website gets loaded hence it can lower down your HTTP request count drastically.
5. Remove external scripts
External scripts are referred to services offered by the third-party website for your websites such as analytics and trackers. These scripts constantly run on your site and can make a lot of HTTP requests. These scripts are not bad for your site, sometimes you do need them just keep only the necessary ones.
Here are some common external scripts that many WordPress sites use normally:
- Google (AdSense, Analytics, etc.)
- Embedded Videos
- Embedded Widgets + Posts
- Social Sharing Plugins
How to reduce transfer size?
All of the above methods will also help you to reduce the transfer size of your website, but there are still some things that you can do to further reduce the transfer size of your website.
1. Compress Images
One of the major big things in size are images, images take most of the page size when you perform the above test you can check each image file size and you can compress big ones into a smaller size for faster loading. There are several different options for how you can compress images on your website.
1. Manual option: You can compress your images by downloading them and comprising them using any software such as Photoshop or an online tool such as CompressJPG. Then reuploading them and replacing previous images with new smaller ones. This technique is useful when you have a small number of images.
2. Use Plugin: If you have a lot of big images on your WordPress website and you wanna compress all of them at once then you can use some plugins to it easily. You can use plugins like WP Smush, Imagify, ShortPixel Image Optimizer, and so on.
Just like Images, you can also manually compress these files using websites like minifier.org or you can rise plugins such as Auptomize, WP Super Minify, Merge + Minify + Refresh, and other similar plugins.
3. Replace jpeg, png into SVG, webp
Another good option to reduce the transfer size of your web page is to use compressed SVGs and WebP images instead of jpeg and png. Both compressed SVGs and Webps are very lightweight and loading time is also faster. You can’t really convert a jpeg or png directly into SVG and all of the jpeg and png can’t be converted into SVG but using it where you can be very useful. You can convert any image into webp and use sites like ezgif.com.
Here are few things which you can do for your site which can be helpful.
- Use CDN, using CDN won’t really reduce page speed or transfer size but it can surely make transfer speed much faster. There are tons of CDNs available such as Stackpath (formerly MaxCDN) and Cloudflare.
- Plugins that we have mentioned in the article can conflict with some themes and plugins so before using any of them always make a backup of your site.
- After implementing these suggestions always cross-check your website performance.
Now you know how you can boost your site speed by reducing HTTP request count and data transfer size. Must use these techniques not just for the faster website but also for better SEO. Let us know in the comment below if you face any issues while implementing anything.
Since you are reading this article to make your WordPress website faster I will highly recommend you to check out our articles on WordPress PageSpeed we have tried to include every possible option for boosting website performance and get a better rank on PageSpeed.