Brotli vs Gzip

Hedloff

Well-Known Member
#1
Hello,
Do you have any recommendations on the Brotli Compression settings?
Should GZIP Static compression be disabled if Brotli is enabled?

Here is my setting before enabling Brotli:
compression.png
 

mistwang

LiteSpeed Staff
#2
should not disable GZIP compression, not all browsers support brotli.
For brotli setting, mainly the compression level, you can google the page compare the compression ratios.
Brotli is slow, but it can give better compression ratio.
 

mistwang

LiteSpeed Staff
#4
For static files, it only need to compress once, so speed is not that important.
We do not support brotli compression for dynamically generated page yet due it is slower speed than gzip.
you have to test against a static file.
 

Hedloff

Well-Known Member
#5
For static files, it only need to compress once, so speed is not that important.
What exactly do you mean by that? Is it cached or something?

I tested with a static file and it shows that it supports:
Yeah! www.domain.tld supports Brotli compression

But checking a random .css file on that website I cannot see that it uses br (Brotli), but rather GZIP:
Accept-Encoding:gzip, deflate

But will files be compressed with Brotli automatically for customers if it's enabled in LSWCP?
 

mistwang

LiteSpeed Staff
#6
compressed static files are cached.
some css files are dynamically generated by PHP, only compressed with gzip. for real static file, the brotli compressed version will be created on demand.
 

Hedloff

Well-Known Member
#7
Is the file cached on the webserver? If the static file are compressed each time by Brotli and it's slower, then it makes no sense to use it?
 
Top