title: How do I check if apache is using "compression" and "far-future" expiration dates?
body: <p>How can I check and see if my web server is serving up content with compression and far future expires headers? YSlow is still telling me that I have resources that are being sent with plain text and without &quot;far-future&quot; expires headers even though I have added the following items to the <code>.htaccess</code> file:</p>
  <pre><code>&lt;IfModule mod_deflate.c&gt;
      AddOutputFilterByType DEFLATE text/html text/plain text/xml
      BrowserMatch ^Mozilla/4 gzip-only-text/html
      BrowserMatch ^Mozilla/4\.0[678] no-gzip
      BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  &lt;/IfModule&gt;
  
  &lt;IfModule mod_expires.c&gt;
      ExpiresActive On
      ExpiresDefault A0
      ExpiresByType image/gif A2592000
      ExpiresByType image/png A2592000
      ExpiresByType image/jpg A2592000
      ExpiresByType image/jpeg A2592000
      ExpiresByType image/ico A2592000
      ExpiresByType image/x-icon A2592000
      ExpiresByType text/css A2592000
      ExpiresByType text/javascript A2592000
  &lt;/IfModule&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/8L7Z6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8L7Z6.png" width="441" height="709" alt="Picture.png" /></a></p>
  
  <p>One of the things it says needs a expires header is a favicon.ico file, and here are the headers that are listed in Firebug:</p>
  <pre><code>HTTP/1.1 200 OK
  Date: Sun, 18 Sep 2011 00:50:03 GMT
  Server: Apache
  Last-Modified: Tue, 21 Dec 2010 21:47:19 GMT
  Etag: &quot;f8233-47e-497f294aba7c0&quot;
  Accept-Ranges: bytes
  Content-Length: 1150
  Cache-Control: max-age=0
  Expires: Sun, 18 Sep 2011 00:50:03 GMT
  Keep-Alive: timeout=5, max=100
  Connection: Keep-Alive
  Content-Type: image/x-icon
  </code></pre>
  <p>One of the resources it says needs to be gzipped is the main index.php file, which is not sending headers of its own AFAIK. Here is the response header:</p>
  <pre><code>HTTP/1.1 200 OK
  Date: Sun, 18 Sep 2011 00:49:33 GMT
  Server: Apache
  X-Powered-By: PHP/5.3.6
  Expires: Thu, 19 Nov 1981 08:52:00 GMT
  Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
  Pragma: no-cache
  Set-Cookie: PHPSESSID=754163feea6fab8a8d6d7f0ef6ed3c29; path=/
  Keep-Alive: timeout=5, max=100
  Connection: Keep-Alive
  Transfer-Encoding: chunked
  Content-Type: text/html
  </code></pre>
  <p>I'm trying to use <code>mod_deflate</code> since this is an Apache 2 server.</p>
  <p>What am I doing wrong, what can I check, and how can I test further?</p>
  <p>It's also telling me &quot;There are 17 components with misconfigured ETags&quot; - not sure what that means either. The e-tags are in the headers and they look OK to me.</p>