How to Keep Request Count Low and Transfer Size Small in WordPress

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.

To get these contents from the server user browser communicate with the server via HTTP requests and with the help of these requests browser loads the server data to render the website to the visitor’s browser. For every single HTML, CSS, javaScript, image, or every single file browser makes HTTP requests to the server to get these files individually.

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?

request count

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.

  1. Chrome Developer tools
  2. Lighthouse (browser-based and CLI)
  3. GTMetrix and Pingdom (Web-based tool)
  4. 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.

3. Combine CSS and JavaScript files

To design a website and perform action and animation you often use a lot of CSS and JavaScript and to properly handle these files developers often make several different CSS and JavaScript files. Also in WordPress, most of the plugins have their own CSS and JavaScript. To reduce the request count you can combine these different files into one single file.

Even if you are not a developer you don’t need to worry there several different plugins available which can easily combine all your CSS and JavaScript files.

Paid plugins

  1. WP Rocket
  2. Perfmatters
  3. NitroPack

Free plugins

  1. WP Fastest Cache
  2. WP Super Minify

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.

There are paid and free plugins available to lazy load your webpage. Paid plugins such as WP Rocket and NitroPack can help you lazy load your website. Lazy Load is a free plugin to do the same.

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.

2. Minify CSS and JavaScript

Another great option to reduce page transfer size is by minifying the CSS and JavaScript files of your website. By minification, you get rid of all the empty and blank spaces of your CSS and JavaScript files and it will decrease the file size and help the site load faster. However it will also make your CSS and JS file kind of unreadable so always keep a backup of these files if you like to manually modify them.

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.

Few tips

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.

Conclusion

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.

Have questions or confused about something WordPress Related? Join Our Discord Server & ask a Question

Leave a Comment

Your email address will not be published.

Scroll to Top