0

Various sources mention different way to control cache using headers:

Expires: Sun, 01 Jan 2014 00:00:00 GMT'

Cache-Control: no-store, no-cache, must-revalidate

Cache-Control: post-check=0, pre-check=0

What I'm wondering is: what is the priority order of these headers? Say I set "Exprires" to 1 day from now, what would happen to the other headers? Do they override the Exprires header?

Also does it matter in which order these headers are sent?

Sam
  • 7,252
  • 16
  • 46
  • 65
laurent
  • 88,262
  • 77
  • 290
  • 428

1 Answers1

2

"Cache-Control" takes precedence over "Expires." (Source: http://www.kaizou.org/2009/02/http-caching-explained/)

HTTP header order is explained here. The "Expires" and "Cache-Control" headers can appear in either order, and the two "Cache-Control" values might just as well be merged into a single header:

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Community
  • 1
  • 1
NPH
  • 103
  • 4