title: Forcing (or highly encouraging) the browser to load webfonts directly from cache
body: <p>I'm trying to get my site to load a few webfonts, and I'd like to configure the reponse headers to tell browsers to cache the font, keep it there, and grab the file directly from the cache instead of sending a request to the server.</p>
  
  <p>Google Webfonts does a great job at this; even when I hard reload in Chrome or Firefox, the font loads directly from cache without even checking if there's a newer version available (it returns a 200 status, with <code>(from cache)</code> displayed in Chrome.</p>
  
  <p>However, when I send my response (I'm using nginx as a web server) with all of the usual cache headers, it fails to do this. It'll be great even getting to the point where the browser <em>won't</em> send a request (and the server sending a 304) on a regular page reload.</p>
  
  <p>Here are Google's headers (from one of their WOFF files) served from cache:</p>
  
  <pre><code>HTTP/1.1 200 OK
  status: 200 OK
  version: HTTP/1.1
  access-control-allow-origin: *
  age: 13190
  alternate-protocol: 80:quic
  cache-control: public, max-age=31536000
  content-length: 28588
  content-type: font/woff
  date: Fri, 13 Dec 2013 23:51:45 GMT
  expires: Sat, 13 Dec 2014 23:51:45 GMT
  last-modified: Thu, 13 Sep 2012 17:47:52 GMT
  server: sffe
  timing-allow-origin: *
  x-content-type-options: nosniff
  x-xss-protection: 1; mode=block
  </code></pre>
  
  <p>Here's one of the responses my server is sending (served 'live'):</p>
  
  <pre><code>HTTP/1.1 200 OK
  Server: nginx
  Date: Sat, 14 Dec 2013 03:40:37 GMT
  Content-Type: font/opentype
  Content-Length: 244744
  Last-Modified: Mon, 09 Dec 2013 22:35:59 GMT
  Connection: keep-alive
  Expires: Sun, 14 Dec 2014 03:40:37 GMT
  Cache-Control: max-age=31536000
  Access-Control-Allow-Origin: *
  Cache-Control: public, max-age=315360000
  Accept-Ranges: bytes
  </code></pre>
  
  <p>(I realize that there are 2 Cache-Control headers, but according to spec, that should be fine? The first one is nginx's, the second one I added manually to add 'public').</p>
  
  <p>What is causing the big difference in behaviour between the two responses?</p>