title: Google PageSpeed compressing and .htaccess
body: <p>I am trying to speed up my website as best as I can. I ran Google's PageSpeed, got 83/100.</p>
  
  <p>Page says to compress resources, such as .js and .css files.</p>
  
  <p>"Compressing resources with gzip or deflate can reduce the number of bytes sent over the network."</p>
  
  <p>Okey, then I googled and edited my .htaccess:</p>
  
  <pre><code>&lt;IfModule mod_deflate.c&gt;
    &lt;FilesMatch "\.(css|js|xml)$"&gt;
      SetOutputFilter DEFLATE
    &lt;/FilesMatch&gt;
  &lt;/IfModule&gt;
  &lt;IfModule mod_headers.c&gt;
    &lt;FilesMatch "\.(js|css|xml|gz)$"&gt;
      Header append Vary: Accept-Encoding
    &lt;/FilesMatch&gt;
  &lt;/IfModule&gt;
  &lt;IfModule mod_expires.c&gt;
    ExpiresActive On
    ExpiresByType image/png A604800
    ExpiresByType image/gif A604800
    ExpiresByType image/jpg A604800
    ExpiresByType image/jpeg A604800
    ExpiresByType text/javascript A604800
    ExpiresByType application/x-javascript A604800
    ExpiresByType text/css A604800
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>When I inspect my site:</p>
  
  <p>Headers:</p>
  
  <pre><code>Accept-Encoding gzip, deflate
  </code></pre>
  
  <p>Cache:</p>
  
  <pre><code>Data Size   332
  Device  disk
  Expires Thu Jan 01 1970 02:00:00
  </code></pre>
  
  <p>And PHP in my site:</p>
  
  <pre><code>if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))
      ob_start("ob_gzhandler"); 
  else 
      ob_start();
  header('Vary: Accept');
  header('Cache-Control: max-age=28800');
  </code></pre>
  
  <p>Any ideas what is going wrong? </p>