Forum: NGINX nginx caching headers

2974d09ac2541e892966b762aad84943?d=identicon&s=25 eiji-gravion (Guest)
on 2014-07-03 05:27
(Received via mailing list)
Hello,

Are there any specific reasons why nginx has both ETags and the Last
Modified headers being sent? From my understanding, this is a bit
redundant
for most situations.


Thanks

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,251441,251441#msg-251441
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2014-07-03 11:46
(Received via mailing list)
Hello!

On Wed, Jul 02, 2014 at 11:26:54PM -0400, eiji-gravion wrote:

> Are there any specific reasons why nginx has both ETags and the Last
> Modified headers being sent? From my understanding, this is a bit redundant
> for most situations.

This is required to support both clients using Last-Modified as a
cache validator, and ETag as a cache validator.  As nginx doesn't
know what a client will use, it returns both.  (And this is
identical to what other servers out there do.)

Originally ETag support was added to support download resumption
in IE9, it needs strong entity tags to be able to resume
downloads using range requests.  And obviously there are lots of
clients which don't support ETag.

--
Maxim Dounin
http://nginx.org/
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.