Note that there are some explanatory texts on larger screens.

plurals
  1. POFirefox max-age based cache expiration behaving weirdly
    primarykey
    data
    text
    <p>Im working on a virtual globe web application which serves a lot of map tiles, and i am trying to tweak the http headers that my server is sending to indicate the browser (Firefox) an expiration time for it to cache these tiles. The way im doing it is through Cache-Control header and max-age parameter. </p> <p>After a few tests, I realized that caching wasnt working for values below 1799 seconds (approximately 30 minutes). Doing some debugging with firebug net panel, I found out that there is a 30 minutes desynchronization between the client and the server clocks. For example, if the server sends this header indicating a 3600 seconds expiration time:</p> <pre><code>Date Fri, 14 Oct 2011 07:46:12 GMT Server Apache/2.2.13 (Fedora) X-Powered-By PHP/5.2.11 Connection close Cache-Control max-age=3600 Content-Length 47864 Content-Type image/jpeg </code></pre> <p>And i browse the cache contents for this request, i get this.</p> <pre><code>Last Modified Fri Oct 14 2011 09:16:16 GMT+0100 (Hora de verano GMT) Last Fetched Fri Oct 14 2011 09:16:16 GMT+0100 (Hora de verano GMT) Expires Fri Oct 14 2011 09:46:11 GMT+0100 (Hora de verano GMT) </code></pre> <p>Note that client times are GMT+1 and server are GMT, so the real skew is about 30 minutes.</p> <p>So, the conclusion i get to is that Firefox is computing the expiration time from the server date header rather than the response arrival date on the client, is this right? If so this is a big issue, cause if i set a expiration of 1 hour, a user in China would never cach, how could i work this around? Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload