Netzlichter
Netzlichter

Reputation: 1

How can I activate json compression for litespeed web server?

I'm using lottiefiles and want to activate json compression to improve my gtmetrix score... How can I activate that with litespeed web server?

Thank you in advance!

Upvotes: 0

Views: 866

Answers (2)

George Wang
George Wang

Reputation: 76

We have updated the default compressible type, MIME type application/json is in the default list now for new installation.

Upvotes: 0

Netzlichter
Netzlichter

Reputation: 1

I got this answer from Lucas Rolff at wpcache slack channel:

LiteSpeed does not automatically compress json, neither as gzip or brotli, the default compressed types are:

text/*, application/x-javascript, application/xml, application/javascript, image/svg+xml,application/rss+xml

This can be modified in the LiteSpeed WebAdmin console under Configuration -> Server -> Tuning, if you want to include json (MIME type being application/json), or use the AddOutputFilterByType as in the link above in your htaccess file.


I added application/json in my LiteSpeed WebAdmin console and it is working perfect!

Upvotes: 0

Related Questions