curl -I -X GET -H "Accept-Encoding: gzip" http://127.0.0.1/ngx_pagespeed_static/js_defer.4Wv5zwfokU.js
Outputs these response headers:
HTTP/1.1 200 OK
Date: Wed, 03 Apr 2013 11:31:23 GMT
Note that there is no compression, and no E-Tag: W/0.
The compression can be fixed by adding a line like this to nginx.conf:
The E-Tag is something that we may want to look in to, as currently enabling defer_javscript will deduct points from pagespeed scores because of this.
This doesn't fix the compression issue in my testing. pagespeed_test.conf.template has it already and I'm seeing this test I added for it fail: https://github.com/pagespeed/ngx_pagespeed/compare/jefftk-gzip-static-js
It also fails in manual testing.
I have to sort out what it is then, it seems configuration specific. I can confirm that testing it on our test configuration doesn't give a compressed response. On my own configuration however, I still do get a compressed response.
@jeffkaufman "This doesn't fix the compression issue in my testing. pagespeed_test.conf.template has it already and I'm seeing this test I added for it fail: https://github.com/pagespeed/ngx_pagespeed/compare/jefftk-gzip-static-js"
This seems a bit weird, some seemingly unrelated gzip_type lines in pagespeed_test.conf.template seem to break the test.
When I comment a few lines, the test passes:
# Turn on gzip for all content types that should benefit from it.
# "gzip_types text/html" is assumed.
That is completely bizarre.
Date: Thu, 16 May 2013 00:14:20 GMT
Fine, i'll update
Edit : Fixed for me too, thanks
static-handler-etag: emit an etag in responses from our static handler
Fixes the etag part of pagespeed#212