HTTP resource caching / fetching

Posted by Bobby Jack on Server Fault See other posts from Server Fault or by Bobby Jack
Published on 2012-02-01T11:45:52Z Indexed on 2012/06/16 21:18 UTC
Read the original article Hit count: 264

Filed under:
|
|
|

I'm trying to optimise a page, and I'm seeing some strange behaviour. Each time I click on a link to the page, all resources are fetched from the server, responding with 200s. However, when I refresh the page (specifically, F5 in Firefox), all resources return a 304 and - of course - the page loads much faster as a result.

The main page returns a 200 in both cases. In the refresh case, If-Modified-Since headers are sent with the requests to the resources. However, in the 'clicking a link' case, they are not. What's the reason for that, and can I control it?

© Server Fault or respective owner

Related posts about apache2

Related posts about webserver