[GitHub] Thedemon007 opened a new issue #1557: Optimized javascript is not compressed
Thedemon007 opened a new issue #1557: Optimized javascript is not compressed URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1557 When downloading to .js.pagespeed. file in specific, the server response with header Content-Encoding: gzip however it is not compressed. ``` curl -v -H 'Accept-Encoding: gzip,defate' http://example.com/control.js.pagespeed.ce.7baaRriFEV.js * Trying 213.136.72.205... * Connected to holidaysrental.eu (213.136.72.205) port 80 (#0) > GET /wp-content/themes/wprentals/js/control.js.pagespeed.ce.7baaRriFEV.js HTTP/1.1 > Host: holidaysrental.eu > User-Agent: curl/7.47.0 > Accept: */* > Accept-Encoding: gzip,defate > < HTTP/1.1 200 OK < Server: nginx/1.14.0 < Content-Type: application/javascript < Connection: keep-alive < Last-Modified: Wed, 09 May 2018 18:59:48 GMT < X-Varnish: 33383 < Age: 0 < Via: 1.1 varnish (Varnish/5.2) < Vary: Accept-Encoding < X-Original-Content-Length: 65971 < Content-Encoding: gzip < Content-Length: 12732 < X-Content-Type-Options: nosniff < Date: Fri, 11 May 2018 22:27:51 GMT < Expires: Fri, 11 May 2018 22:32:51 GMT < Cache-Control: max-age=300,private < X-Page-Speed: 1.13.35.2-0 < var has_transparent=0;var componentForm;var price_array;var ``` If you try to get the original file, the server does compress it correctly. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] jmarantz commented on issue #1557: Optimized javascript is not compressed
jmarantz commented on issue #1557: Optimized javascript is not compressed URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1557#issuecomment-388572017 This is probably not the issue, or may even be a cut&paste error, but in your accept-encoding you misspelled "deflate" (lacking the L). It does say content-encoding:gzip in the response headers. Also of note: Varnish appears to be in the serving path, which may do its own inflation or something. In any case, an equivalent fetch from ngxpagespeed.com appears to work as expected. ``` curl -v -H 'Accept-Encoding: gzip,deflate' 'https://www.ngxpagespeed.com/rewrite_javascript.js.pagespeed.ce.Fa3p2b86VH.js' ... GET /rewrite_javascript.js.pagespeed.ce.Fa3p2b86VH.js HTTP/1.1 > Host: www.ngxpagespeed.com > User-Agent: curl/7.54.0 > Accept: */* > Accept-Encoding: gzip,deflate > < HTTP/1.1 200 OK < Server: nginx/1.13.8 < Content-Type: application/javascript < Transfer-Encoding: chunked < Connection: keep-alive < Vary: Accept-Encoding < Strict-Transport-Security: max-age=15768000 < X-Original-Content-Length: 260 < Date: Sat, 12 May 2018 17:52:27 GMT < Expires: Sun, 12 May 2019 17:52:27 GMT < Cache-Control: max-age=31536000 < ETag: W/"0" < X-Page-Speed: 1.13.35.2-0 < Content-Encoding: gzip < U?K?0 D?9ňU ?k?e{?U * Connection #0 to host www.ngxpagespeed.com left intact ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] jmarantz commented on issue #1557: Optimized javascript is not compressed
jmarantz commented on issue #1557: Optimized javascript is not compressed URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1557#issuecomment-388586509 @Thedemon007 -- can you verify whether your Varnish is set up to incorporate Accept-Encoding into its cache key? That might be the default for Varnish, but it's worth checking. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] Thedemon007 commented on issue #1557: Optimized javascript is not compressed
Thedemon007 commented on issue #1557: Optimized javascript is not compressed URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1557#issuecomment-388593338 I'm sure something happens with the compression, firefox show this message [https://prod-cdn.sumo.mozilla.net/uploads/images/2017-06-08-11-29-07-679a8c.png](https://prod-cdn.sumo.mozilla.net/uploads/images/2017-06-08-11-29-07-679a8c.png) My config module pagespeed releated with js is: > pagespeed EnableFilters canonicalize_javascript_libraries; > pagespeed EnableFilters defer_javascript; > pagespeed EnableFilters rewrite_javascript; > pagespeed EnableFilters inline_javascript; > pagespeed EnableFilters combine_javascript; > the problem only happens to me with a file, i think varnish work fine, how to i can verify? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] jmarantz commented on issue #1557: Optimized javascript is not compressed
jmarantz commented on issue #1557: Optimized javascript is not compressed URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1557#issuecomment-388597447 I don't think Varnish has a bug. I'm just trying to understand how the systems interact. Can you try taking Varnish out of the serving path, temporarily, just to see if that resolves the problem? Even if it does resolve it, this may be a bug in PageSpeed or a configuration incompatibility between Varnish and PageSpeed, and if you run this experiment it would help us narrow it down. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services