以下の内容はhttps://kazeburo.hatenablog.com/entry/2013/09/27/165442より取得しました。


Nginx gzip and Vary. How to

I want to output "Vary: Accept-Encoding,User-Agent".
But gzip_vary only adds Accept-Encoding. "add_header Vary" does not merge headers.

My answer is..

location / {
    gzip on;
    gzip_disable  "MSIE [1-6]\.";
    gzip_types text/css application/x-javascript;
    gzip_vary off;
    if ( $request_filename ~ "\.(html|css|js)$" ) {
        add_header Vary "Accept-Encoding,User-Agent";
    }
    root /path/to/htdocs
}

MSIE < 7 have a bug around gzip and cache. Do not response compressed javascript/css for those browser.




以上の内容はhttps://kazeburo.hatenablog.com/entry/2013/09/27/165442より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14