问题描述:

I added use Rack::Deflater to config.ru in an attempt to serve gzipped css and js.

but when I load the page I still see that css and js are served and not the css.gz

should I see css.gz or js.gz? or did I miss something

网友答案:

This is the correct behavior. Check your HTTP headers to see if the gzip compression actually works:

curl -I -H "Accept-Encoding: gzip,deflate" <url>

This should return something like Content-Encoding: gzip if gzip compression is enabled.

You can also see the compressed output by using a lowercase -i. Alternatively to curl, you can also use the WebKit developer tools (or something similiar) to check this.

相关阅读:
Top