wp-rocket icon indicating copy to clipboard operation
wp-rocket copied to clipboard

Add Brotli rules to htaccess

Open remyperona opened this issue 7 years ago • 24 comments

Brotli is a new compression algorithm that performs better than gzip to compress static assets.

It is now well supported in all major browsers: https://caniuse.com/#search=brotli

This means we can add a rules block to add support for it in the htaccess, which will result in a performance improvement for websites using Apache server.

We will keep the current deflate rules as a fallback for servers without mod_brotli or for older browsers.

remyperona avatar Feb 08 '19 20:02 remyperona

Remy did some initial R&D and noticed that the performance boost from dynamic Brotli compression was not very efficient. Ideally we need to generate Brotli compressed files.

More R&D is needed on this one.

arunbasillal avatar Aug 05 '19 16:08 arunbasillal

We really like the quality of WP Rocket and it's ability to produce good results. I think that the element missing is Brotli. Google PageInsights detects if you have it, and any website that I use that allows for Brotli I can see a significant performance improvement. This was researched over a year ago, but there are clearly advancements and I don't imagine implementing this would be that much more difficult than what is done to compress you just need to provide the bz file.

shaneonabike avatar Aug 26 '20 17:08 shaneonabike

Any progress on this? there's a pretty straightforward extension available https://github.com/kjdev/php-ext-brotli, which you can easily check with extension_loaded and/or by checking for function brotli_compress. Looks like only class-cache.php needs to be updated together with htaccess rules, plus maybe a few more places (you know best)

alexincore avatar Apr 20 '21 10:04 alexincore

Related ticket https://secure.helpscout.net/conversation/1539258239/270630?folderId=2675957

camilamadronero-zz avatar Jun 11 '21 14:06 camilamadronero-zz

Updates please? Shouldn't this just be a simple selector in the WP Rocket settings which compression to use?

kevinjavitz avatar Jul 28 '21 13:07 kevinjavitz

https://secure.helpscout.net/conversation/1584477724/283404?folderId=377611

webtrainingwheels avatar Jul 30 '21 21:07 webtrainingwheels

Any progress on this issue?

tnowak avatar Jan 07 '22 15:01 tnowak

Since 2019 the Brotli compression feature is requested for WP-Rocket. Many updates appeared but still no Brotli!! Isn't it nonsense for a plugin that prides itself on being one of the best for improving PageSpeed ​​score?

Please provide a fix urgently because on many servers with PHP 8.1 it is no longer possible to integrate GZIP, only Brotli.

slhuile avatar Aug 07 '22 09:08 slhuile

When can we expect something movement on this topic?

ultrazeus avatar Oct 15 '22 23:10 ultrazeus

This seems like a small change. Why isn't it supported in 2022?

carstenjaksch avatar Nov 22 '22 10:11 carstenjaksch

Hey! Can we have an update on this? Pre-compressing cache files with Brotli could lead to better performance for our websites. A free plugin from KeyCDN called Cache Enabler already offers the very same function. So why is a paid plugin like WP-Rocket still not offering it?

joaodath avatar Jun 08 '23 04:06 joaodath

I agree with joaodath. I understand that Brotli wasn't fully supported by browsers a few years ago but now all CDN's and browsers fully support it. In fact, many CDN's are making Brotli compression to the end user enabled by default. However, for real bandwidth savings it would be optimal to have the origin server with WProcket pre-compressed natively with Brotli. That way bandwidth costs are significantly reduced end-to-end (origin-proxy) since the origin source is compressed using Brotli. This seems like a no brainer. Plus, this feature request was started back in 2019. It is 2023!

inspiredtaste avatar Jun 14 '23 20:06 inspiredtaste

i agree honestly. Also, we are paying for this service and adding this feature is not that much of a deal breaker. There are plenty of other extensions that generate the proper images we just need this final setup to make things roll perfectly.

shaneonabike avatar Jun 21 '23 12:06 shaneonabike

Is there any update on this? Really does seem like something easy to implement.

It is now August 2023. Can we have some Brotli headers for HTACESS please.

I have raised an additional feature request to try and prompt an official response from WP-Rocket.

Still no native Brotli support in the major 3.15 plugin update? Is this on the roadmap for WProcket 3?

inspiredtaste avatar Sep 20 '23 18:09 inspiredtaste

There is any hope to have the brotli support for WP Rocket?

fidoboy avatar Oct 19 '23 17:10 fidoboy

Can we have an update please? Seems like an easy fix. Surely we just need brotli headers adding to ht.access?

Crazy. Issue opened on Feb 8, 2019, more than 4 years ago.

ultrazeus avatar Oct 19 '23 19:10 ultrazeus

@piotrbak Do we have an update on this post? Seems like a fairly easy fix to make as it is literally a change to .htaccess and nginx settings. There shouldnt be anything to change in Wp-Rocket itself? We are just telling the server how to compress the files?

There would also be pre-compressing cache files for css/js using brotli. Other cache plugins make use of the Brotli PHP extension so so I presume WP-Rocket could as well. There's really no reason for years of delay other than the obvious that they're just not working on it.

endymion0000 avatar Oct 31 '23 11:10 endymion0000

There would also be pre-compressing cache files for css/js using brotli. Other cache plugins make use of the Brotli PHP extension so so I presume WP-Rocket could as well. There's really no reason for years of delay other than the obvious that they're just not working on it.

Shouldnt that be handled by the server like GZip?

Ticket: https://secure.helpscout.net/conversation/2494107486/471685/

camilamadronero avatar Jan 30 '24 19:01 camilamadronero

Thanks for the link but we don't have access to help scout. It is a paid service. Is this link internal to WProcket?

inspiredtaste avatar Jan 30 '24 21:01 inspiredtaste

I also came here to read up on WP Rockets Brotli support when noticing that activating it on my server made my Wordpress login stop from working properly. Any news on the status of Brotli support? Thanks!

j-peeters avatar Feb 12 '24 13:02 j-peeters