Gzip_types not working as expected

gzip is not working on my piwik.js file according to Google at
developers.google.com/speed/pagespeed/insights. It’s working fine on
my CSS file. How can I troubleshoot this?

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

  • Grant

gzip is not working on my piwik.js file according to Google at
developers.google.com/speed/pagespeed/insights. It’s working fine on
my CSS file. How can I troubleshoot this?

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

  • Grant

Any help here guys?

  • Grant

Use curl -i to see what you actually get back on a file request.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,257147,257198#msg-257198

javascript in question is less then the (default ?) minimum size for gizp to
be done, check the official documentation for this.

Anyway, an easy way to check if you are missing a mime type on your gzip
list is to open your page with firebug (or similar) enabled and check the
type and size of the particular resource.

Just needed to add application/javascript. Thanks guys.

  • Grant

Hi,
On 03/11/2015 01:09 PM, Grant wrote:

gzip is not working on my piwik.js file according to Google at
developers.google.com/speed/pagespeed/insights. It’s working fine on
my CSS file. How can I troubleshoot this?

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

You probably miss application/javascript in your list, or the size of
your javascript in question is less then the (default ?) minimum size
for gizp to be done, check the official documentation for this.

Anyway, an easy way to check if you are missing a mime type on your gzip
list is to open your page with firebug (or similar) enabled and check
the type and size of the particular resource.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs