How To Make Fewer HTTP Requests In WordPress (2019 Guide)

How To Make Fewer HTTP Requests In WordPress (2019 Guide)

Need to make fewer HTTP requests on your WordPress site?

This just means you need to reduce how many elements (requests) load on your site.

Combining CSS and JavaScript files can help, but there are other optimizations that can reduce HTTP requests, like selectively disabling plugins that don’t need to be loaded on specific pages, disabling WooCommerce scripts and styles on non-eCommerce pages, or avoiding high CPU plugins that generate high number of requests and slow down your site.

Making fewer HTTP requests is a recommendation in GTmetrix, Pingdom, and other speed testing tools. The recommendations below will help reduce requests and make your site faster.

 

1. Combine CSS Stylesheets + JavaScript

Combining CSS Stylesheets + JavaScript means you need to copy/paste everything in your CSS files into 1 single file. This allows browsers to make 1 single request for a CSS file instead of multiple requests. Most cache plugins have an option to combine your CSS + JavaScript files.

Step 1: In your cache plugin settings, find the option to combine and minify CSS + JavaScript.

Step 2: Enable each setting one at a time and test results in GTmetrix.

Minify Combine CSS Files

Minify Combine JavaScript Files

Step 3: Check for visible errors on your website. If you see errors, view the source code, find the problematic files, and exclude them from your CSS or JavaScript minification settings. For example, if your slider disappears when enabling a certain setting, check your slider files in the source code and exclude the problematic file. If you don’t see errors, there is no need for this.

Alternatively, you can manually combine your CSS files in WordPress under Appearance > Theme Editor. You would simply copy and paste the contents in all files into 1 single CSS file.

[…]

 



This article was written by Tom Dupuis and originally published on Tom Dupuis.

Disclosure: Some of the links in this post are "affiliate links." This means if you click on the link and purchase the product, We may receive an affiliate commission.

Leave a Comment

You have to agree to the comment policy.

Scroll to Top