How can I check that nginx is serving the .gz version of static files, if they exist?
I compiled nginx with the gzip static module, but I don\'t see any mention of the .
There is some hint I've noticed regarding ETag
response header.
If static file is served by nginx, then header looks like this: ETag: "135a-BQhu6KL71dyeCXcVZme6ug"
, however, when nginx is compressing the response (through gzip module) it looks like this: ETag: W/"135a-BQhu6KL71dyeCXcVZme6ug"
(notice W/
).
You can use this as well as Content-Encoding: gzip
to distinguish plain static files, pre-compressed static files, and files compressed on the fly.