昨日, Apache の設定をいくつか変えた。
httpd.conf を開けて
次の行を httpd.conf に付け加える。この件では,まだよくわからないことがいろいろあるんだが,まあ。
# Enables generation of Expires headers
ExpiresActive On
# expire images and some applications after a month in the client’s cache
ExpiresByType image/gif A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000
ExpiresByType text/javascript A2592000
ExpiresByType text/css A2592000
ExpiresByType application/javascript A2592000
ExpiresByType application/x-font-woff A2592000
# HTML documents are good for a week from the time they were changed
ExpiresByType text/html M604800
ExpiresByType text/plain M604800
ExpiresByType text/xml M604800
# Enabling Compression
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css application/javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIEs(7|8) !no-gzip !gzip-only-text/html
# Make sure proxies don’t deliver the wrong content
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ dont-vary
Header append Vary User-Agent env=!dont-vary
This website uses cookies.