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


For two later requests, which of the following two headers is given by browsers, one of them is given Should Change: ETag or Last-Defined? According to section 13.3.4, an HTTP 1.1 client is required to use ETag in any cache.

-Conditional request, and if both of them have an ETag and last modified, both of them should be used. The ETG header is considered to be a strong validator (see section 13.3.3), unless clearly declared by the server weak, while the last modified header is considered weak, as long as at least one minute The difference between it and the date header is not present. Note, however, the server does not need to send either (but it should, if it can).

Note that the client does not check the header whether they have changed; It just blindly uses them in the next conditional request; It is up to the server to evaluate whether the requested content should be sent or 304 modified responses are not sent. If the server only sends one, then the client will use it alone (However, only strong validators are useful for range requests). Of course, this is also at the discretion of the intermediate cache (unless they have been prevented from caching through the cash control instructions) and how will they work on the header as a server? RFC says that if they are not valid then they will not be modified to 304, but since the header values ​​are created by the server, it is a bit of a lot of relaxation.

In practice, I have seen that both chrome, firefox, and IE 7+ are available, send both headers. I also tested the behavior while sending the modified headers, which I previously suspected from information in the RFC. I sent only conditional requests to the four test-takers if the page (s) was refreshed or it was the first time that the page was requested from the current process


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -