1

I have a website that is hosted on an nginx server with gzip compression enabled. If I check my website on http://gzipwtf.com/, I see that only 2 files out of 7 are compressed. First I tought that maybe something is wrong with the filename/pattern, but I could not figure out why certain files are compressed and others not. There is no connection between file-type, filename, file-location and compression. It's not only js files or css files not working. Both types work.. but not for every file. I have the following files:

  • css/sb.min.css (compressed)
  • css/style.min.css (not compressed)
  • css/jquery.mcustomscrollbar.min.css (not compressed)
  • js/jquery.mcustomscrollbar.concat.min.js (not compressed)
  • js/jquery.sidebar.min.js (not compressed)
  • js/jquery.min.js (not compressed)
  • js/sbhandlers.js (compressed)

I also checked in the DeveloperTools of Google Chrome. The Request Header was on each file like this:

Accept:*/*
Accept-Encoding:gzip, deflate, sdch
Accept-Language:en-US,en;q=0.8
...

But as to expect only the two compressed files had this in the Response Header:

Content-Encoding:gzip

I have absolutely no idea why only two files are compressed. I already wrote to the support of the webhoster, but he said everything is configured correctly.

Am I missing the point?! Thanks for your help!

noah
  • 174
  • 9
  • What are the sizes of those non-compressed files? In some cases when the compression factor would be small (or too much overhead vs compression), no compression is done (small files, already compressed files, like jpg, png, ..) – Danny_ds Jan 14 '16 at 02:17
  • Possible duplicate of [NGINX gzip not compressing JavaScript files](http://stackoverflow.com/questions/23939722/nginx-gzip-not-compressing-javascript-files) – x64architecture Jan 14 '16 at 04:31
  • @Danny_ds The files are bigger than the compressed ones. Some analyzer tools say that I could reduce the files for 75%.. so I thinks that is not the reason. – noah Jan 14 '16 at 06:20
  • @x64architecture No, because one js file is compressed. – noah Jan 14 '16 at 06:21

0 Answers0