title: Setting expire headers and gzipping data via .htaccess
body: <p>I'm trying to set it up so that the browser will cache the webfonts for a long period and also attempting to gzip them for a faster download.</p>
  
  <p>From what I can understand you can do this via your <code>httpd.conf</code> file in Apache or via <code>.htaccess</code>.</p>
  
  <p>I'm not sure how to tell if gzip is enabled though, I read something about searching your <code>httpd.conf</code> file for <code>DEFLATE</code>; I did that, but found nothing - so not sure if it's enabled or not!?</p>
  
  <p>Anyway, I have put this code below into the <code>.htaccess</code> file, partially because I didn't know where to put it in the httpd.conf file and partially because it's easier to make changes in .htaccess file without bothering my host continually.</p>
  
  <p>Here is the code..</p>
  
  <pre><code># Add correct content-type for fonts
  AddType application/vnd.ms-fontobject .eot
  AddType font/ttf .ttf
  AddType font/otf .otf
  AddType font/x-woff .woff
  AddType image/svg+xml .svg
  
  # Compress compressible fonts
  AddOutputFilterByType DEFLATE font/ttf font/otf image/svg+xml
  
  # Add a far future Expires header for fonts
  ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
  ExpiresByType font/ttf "access plus 1 year"
  ExpiresByType font/otf "access plus 1 year"
  ExpiresByType font/x-woff "access plus 1 year"
  ExpiresByType image/svg+xml "access plus 1 year"
  </code></pre>
  
  <p>Now, I'm wondering if this is correct or not as I also seen this similar, but different code for the expiry..</p>
  
  <pre><code>ExpiresByType application/x-font-ttf "access plus 1 month"
  ExpiresByType font/opentype "access plus 1 month"
  ExpiresByType application/x-font-woff "access plus 1 month"
  ExpiresByType image/svg+xml "access plus 1 month"
  ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
  </code></pre>
  
  <p>Does it matter where you place it in the <code>.htaccess</code> file or can it go anywhere?</p>