昨日, Apache の設定をいくつか変えた。
httpd.conf を開けて
- HTTP 圧縮を使うために,モジュール mod_deflate の行をアンコメントする。
LoadModule deflate_module modules/mod_deflate.so - ディレクティブ AddOutputFilterByType (リンク先には,今のところ日本語なし) を使うために,以下の行をアンコメントする。
LoadModule filter_module modules/mod_filter.so - ディレクティブ Header を使うために,以下の行をアンコメントする。
LoadModule headers_module modules/mod_headers.so - モジュール mod_expires の行をアンコメントする。
LoadModule expires_module modules/mod_expires.so 
 次の行を 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