Question

Is it possible, to set up apache to serve a combination of headers so that client (browser) will:

  • see that the content is flagged to be valid (for example image expires 10 years from now)
  • has the content in it's cache
  • doesn't ask server 'is that content valid' - as it will always get http 304 status

basically, is it possible to tell browser "don't ask server if that image is valid, if you have it in your cache it means its valid, no exceptions!"?

Was it helpful?

Solution

OK, here's what I discovered.

If a person clicks an url, than if the headers (expire time) is set properly (far into the future), than the browser will optimalize, and dont ask for that particular resource.

If you click refresh, it will force the browser to ask for all resources (and mostly get a lot of 304's).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top