• Hello everyone,
    I have created a news portal with WordPress and installed W3 Total Cache for speeding it up.
    I have enabled gzip compression but, after a performance test I did with GTMetrix, I get F to gzip compression and it shows 2 files that need be compressed:

    Enable compression for the following resources to reduce their transfer size by 1016.9KiB (89% reduction).

    Compressing https://marketpost.gr/wp-content/themes/Newspaper/style.css?ver=8.0 could save 994.9KiB (89% reduction).
    Compressing https://api.forecast.io/forecast/14e061efad871728d513ff24ed0850d5/49.2866,-123.1158?lat=49.2866&lon=-123.1158&units=si&exclude=minutely%2Calerts%2Cflags&location=ip&unit_c=°C&unit_f=°F&lang=el&city=Vancouver%2CCA&callback=completeCallback could save 22.0KiB (84% reduction).

    My hosting provider done a very good job with mod_deflate in .htaccess but I need to gzip compress these to files excplicitly.

    However, obviously, I don’t know how…

    Any help, please? Thank you in advance.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Your server should automatically gzip text files. First be sure your browser is signaling it can accept gzip. Use your browser’s network developer tool. Request the file, then click on the file in the tool. Header details will be displayed. Be sure the request header includes “gzip” after “Accept-Encoding:”

    You can see when your server is compressing files when the response header includes “Content-Encoding: gzip”. Your server is not currently doing so for style.css. I don’t know much about configuring LiteSpeed servers. Something I found in a quick search suggests:

    The ideal way to enable compression in Litespeed is to do it through the configuration under “tuning”. Just go down to “enable compression” and check to see if it is on, if not click “edit” then choose to turn it on. While you are there, look over the several Gzip options that are nearby.

    Perhaps one of those options is to compress “text/css” file types?

    There’s little you can do about what the forecast.io server does. If your browser is sending a request header for Accept-Encoding: gzip, that’s all you can do on your end.

Viewing 1 replies (of 1 total)
  • The topic ‘Enable gzip for specific files’ is closed to new replies.