deflate
現在、Apache構成で使用して、CSS、JS、および画像をキャッシュしています。
これが私のコードです:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
ヘッダーを確認すると、次のように表示されます。
Host www.domain.com
User-Agent Mozilla/5.0 (X11; Linux i686; rv:6.0.2) Gecko/20100101 Firefox/6.0.2
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip, deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection keep-alive
If-Modified-Since Fri, 30 Sep 2011 01:05:01 GMT
If-None-Match "124741af-1c4b9-4ae1136f3f9d0"
Cache-Control max-age=0
すべてが良さそうAccept-Encoding
ですgzip, deflate
、それは私が欲しいものですが、今私はそれを見ることCache-Control
ができmax-age=0
ます。
それはdeflateを使用したキャッシュの目的を無効にしますか?つまり、キャッシュは1日間だけで、翌日はキャッシュされないか、リロードする必要がありますか?
注:私の画像はめったに変更されません。私のCSSとJSは週に1回変更されます。