Enable GZIP by .htaccess

slimak

Well-Known Member
#1
Hello,
is there possible to enable GZIP compression by .htaccess file, when it is turned off in LiteSpeed configuration file?

Something opposite to:
RewriteRule . - [E=no-gzip:1]
 
#3
Reopening the question, how to enable gzip using htaccess or vhost level?

When we first implemented litespeed there was a lot of clients complaining that their pages break, the reason was that browsers was unable to "resume" static file, there was some errors while opening static files (like js/css), the culprit was gzip compression, that's why we disabled gzip globally. Now one of our client's asking how to enable gzip on their site and we don't want to break one more time sites because we don't know if it's fixed and how to test it.

I found some solution for that, but i don't know if litespeed support all of that and if it's safe to use.
http://www.bitstorm.org/weblog/2010-5/Faster_websites_with_gzip_compression.html
 

NiteWave

Administrator
#4
it should have been fixed long time ago.
force re-install latest 4.2.21, then enable gzip globally for a short time.
you can revert back easily. the risk should be minimum.

I read the "solution", it's not practical. since you've to manually gzip static files yourself.
 
#5
"manually gzip static files yourself", yes, but like you probably saw few times, some frameworks compile multiple .css files that they got into one file, they could also just gzip them

The only question is: Is it possible to set those or similar rulesets in litespeed? I know that litespeed probably cache those static files after compressing (to decrease cpu usage), but still there could be some really big files that exceed cache size limit and that could be very helpful.
 

NiteWave

Administrator
#6
those rules works -- I tested before while not test it now.
wordpress plugin -- W3 Total Cache had those rules (not sure latest version), I tested and just works.
 
Top