What takes precedence: the ETag or Last-Modified HTTP header?

Viewed 23047

For two subsequent requests, which of the following two headers is given more weight by browsers should one of them change: ETag or Last-Modified?

3 Answers

Isn't it more like an "OR" expression. In pseudo code:

if ETagFromServer != ETagOnClient || LastModifiedFromServer != LastModifiedOnClient
   GetFromServer
else
   GetFromCache
Related