Forum: NGINX nginx caching headers

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
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/
This topic is locked and can not be replied to.