GZip not compressing everything


One of our client sites is reporting that 3 files aren’t being compressed.

GZip is enabled on our server and we get a grade D for compression through YSlow so clearly some things are being compressed. I’m just stumped as to why these 3 files specifically aren’t being.

Our nginx.conf contains this:

# Gzip Settings

gzip on;
gzip_disable "msie6";
gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css;

Has anyone else experienced this?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

OK. Rebooting my droplet fixed the issue. Magic…

Have you restarted nginx after making the changes to the configuration file?

sudo service nginx restart

if I download the file and compress it it compresses fine with nginx

here is my config

        gzip on;
        gzip_disable "MSIE [1-6]\.(?!.*SV1)";
        gzip_min_length  500;
        gzip_buffers  4 32k;
        gzip_types    text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml image/svg;
        gzip_vary on;

its basically the same as yours but we get different results.

My Server Result on Your File all.css

Yours all.css

it could be caused by the file size not meeting your requirements (default gzip reqs.)