title: Pages aren't caching right, response headers seem wrong... how to fix?
body: <p>Ok, I really didn't know how to put the question but my problem or at least I think it's the problem goes like this:</p>
  
  <p>The blog I am working on loads really slow and so I did the normal things to speed it up such as add gzip and disabled all plug-ins etc. and it didn't help. So I looked at the headers being sent in Firebug and noticed the original request for the page was taking forever while the rest of the requests loaded as normal.</p>
  
  <p>Here's the response/request headers for a given page:</p>
  
  <p><strong>Request Headers</strong></p>
  
  <pre><code>Host:               dev.mydomain.com
  User-Agent:         Mozilla/5.0... ...Firefox/3.6.17
  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
  Keep-Alive:         115
  Connection:         keep-alive
  Referer:            http://dev.mydomain.com/blog/2011/05/06/hello-world/
  Cookie:             Cookie data...
  </code></pre>
  
  <p><strong>Response Headers</strong></p>
  
  <pre><code>Date:               Tue, 07 Jun 2011 17:37:42 GMT
  Server:             Apache
  X-Pingback:         http://dev.mydomains.com/blog/xmlrpc.php
  Expires:            Thu, 19 Nov 1981 08:52:00 GMT
  Last-Modified:      Tue, 07 Jun 2011 17:37:59 GMT
  Cache-Control:      no-store, no-cache, must-revalidate, post-check=0, pre-check=0
  Pragma:             no-cache
  Vary:               Accept-Encoding
  Content-Encoding:   gzip
  Content-Length:     4981
  Connection:         close
  Content-Type:       text/html; charset=UTF-8
  </code></pre>
  
  <p>Obviously something is wrong here as there's no cache, connection is set to close and the expires is 30 years ago.</p>
  
  <p>Here's my .htaccess file where I set my expires header etc.</p>
  
  <p><strong>.htaccess</strong></p>
  
  <pre><code># compress text, html, javascript, css, xml:
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/xml
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/x-javascript
  
  # Or, compress certain file types by extension:
  &lt;Files *.html|*.php&gt;
  SetOutputFilter DEFLATE
  &lt;/Files&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 text/css A2592000
  ExpiresByType text/javascript A2592000
  ExpiresByType application/javascript A2592000
  ExpiresByType application/javascript A2592000
  
  FileETag none
  
  AddType text/x-component .htc
  AddType image/x-icon .ico 
  
  AddHandler application/x-httpd-php .php .html
  
  DirectoryIndex index.php
  allow from all
  RewriteEngine on
  
  RewriteBase /  
  RewriteCond %{REQUEST_URI} ^/blog/
  RewriteCond %{REQUEST_FILENAME} !-f  
  RewriteCond %{REQUEST_FILENAME} !-d 
  RewriteRule ^(.+)$ /blog/index.php [L]
  
  RewriteCond %{SCRIPT_FILENAME} !-f
  RewriteCond %{SCRIPT_FILENAME} !-d
  
  ## Ignore CSS, Scripts and Images
  RewriteRule !\.(xml|swf|js|ico|gif|jpg|png|css|htc)$ index.php [L]
  </code></pre>
  
  <p>Any help if much appreciated.</p>
  
  <p>BTW, I'm running WordPress 3.1.1 on PHP 5.2.10/MySQL 5.1 on CentOS 5.*</p>