Configuration for HTTP/2
If your site runs on HTTP/2, here are the things you should consider for WP Rocket.
Not sure if your site uses HTTP/2? Check with this simple tool:
⚡️ HTTP/2 test by KeyCDN
In this article
To combine, or not to combine?
While concatenation (i.e. combining CSS and JS into fewer files) is considered a best practice under HTTP/1, that’s not necessarily the case with HTTP/2.
There is ongoing debate as to whether some concatenation, i.e. combining files into small groups is beneficial. The real answer is that it may vary from site to site. We tend to think that concatenation won’t be as of much benefit on HTTP/2, but you should test the load time of your site with and without these options since results can vary.
WP Rocket reminds you to not activate file concatenation if your site runs on HTTP/2:
If your server uses HTTP/1, it’s worth to give them a try. Keep in mind, though, that these settings don’t work with all plugins or themes! Read more about potential issues and troubleshooting in this article:
Reducing the Number of Minified Files
PageSpeed Insights, Pingdom Tools, or GTmetrix still saying you should combine CSS/JS files?
Most of the speed testing tools don’t yet adjust their recommendations or performance grade based on detection of HTTP/1 or HTTP/2. So you should always base your configuration on load time, not performance grade.
Legacy combine options from before WP Rocket 2.11
Before WP Rocket 2.11, concatenation was split into 2 options per file type. The second option combined all CSS/JS files into as few files as possible.
If you still run WP Rocket in an earlier version than 2.11, those second options are not recommended for HTTP/2. If your site runs on HTTP/2, leave these boxes un-checked.
Domain sharding (nope, not a typo) is the practice of dividing up assets to be served from a few subdomains, and it is no longer a best practice with HTTP/2. If you’d like to read more about it, there’s an article on our blog:
What Is the Difference between a CDN and Domain Sharding?
What about CDNs?
A CDN can also perform domain sharding, so you may be wondering if you still need your CDN? The answer is “yes”!
The benefit of a CDN in serving assets from geographic locations closest to your visitors is still relevant in an HTTP/2 world. But there’s no need to create several subdomains to serve them from and the DNS lookup time required for each one will detract from performance.