Jump to content

Gzip Success on CSS but Fail on Javascript


Recommended Posts

I have already move to new VPS, site loading is great but I have one problem that I cant solve.

 

My VPS use nginx and I have enable gzip compression using the following code:

 

        gzip  on;
        gzip_disable "MSIE [1-6]\.(?!.*SV1)";
        gzip_min_length  1100;
        gzip_buffers  4 32k;
        gzip_comp_level 6;
        gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
        gzip_vary on;
 
Using website performance test (webpagetest.org, gmetrix, google dev, tool.pingdom) shows that Gzip compression are working fine except for one javascript file:
 
/themes/default/cache/d89e42314e6e197b33e2dba5524319cf.js
 
This file size is about 100-150kb and will compressed 68% if gzip not fail on javascript.
 
Please help me to solve this problem. Thanks
Edited by CumaSegini (see edit history)
Link to comment
Share on other sites

Grabber the actual file header and see if gzip is enabled on the file. What I use is http://web-sniffer.net/

thanks for your information.. 

 

my website cant checked using http://web-sniffer.net/ (Error while fetching URL/ cant connect port 80), but when I check some others website is ok.

 

In your oppinion, why my web fail to check? Is this bacause of my server configuration (such as using nginx then apache) or the problem is in my file header?

Link to comment
Share on other sites

 

oke, thanks. Check again and ok now.

 

Then I check on http://http://www.webpagetest.org/, css is gzipped but one js file failed. http://www.screencast.com/t/BCnFFnfAQY8

 

 

this is my nginx setting http://www.screencast.com/t/V0099kiAjX9l

Edited by CumaSegini (see edit history)
Link to comment
Share on other sites

  • 6 months later...
  • 6 months later...

I have same problem. In theme generated javascript

 

/themes/theme/cache/v_40_35bde31f4cc51ecbf3b7e8a94b50bf7c.js

 

PageSpeed Insights shows

Turn on compression
Compressing resources using gzip or deflate functions reduces the amount of data transmitted over the network.
Turn on compression for the following resources to reduce the amount of data transmitted on 240.7 Kb (70%).
 
 
Please help in this problem
Link to comment
Share on other sites

×
×
  • Create New...