- From: Karim A. <directeur@gmail.com>
- Date: Thu, 15 Nov 2007 19:49:24 +0100
- To: "Nikita The Spider The Spider" <nikitathespider@gmail.com>
- Cc: "W3C Validator Community" <www-validator@w3.org>
Hi Philip, Thank you! You are definitely right! Now I do understand that whatever the server answers I should take it as it is, and process in consequence. I mean it's wiser to accept that a given server doesn't want to provide caching information about its content. The question which seriously troubles me is: Is it possible to have a server that returns the same etag/last-modified data even if the content has changed? How should we handle that if it happens? Karim -- http://xhtml-css.com Be Valid or die learning On 11/15/07, Nikita The Spider The Spider <nikitathespider@gmail.com> wrote: > On Nov 15, 2007 9:47 AM, Karim A. <directeur@gmail.com> wrote: > > > > I read here: http://validator.w3.org/todo.html > > that in the 0.9.x series you'll start using Last-Modified > > to cache validation results and request again only > > if-modified-since. > > > > I'm very interested in that since the release of > > our humble project http://xhtml-css.com > > and I struggle with some say chaching "standards". > > Not all servers provide "Last-Modified", some provide > > "etag", other servers nothing and some others both![1] > > Hi Karim, > Providing both is valid. According to the HTTP 1.1 spec, "[T]he > preferred behavior for an HTTP/1.1 origin server is to send both a > strong entity tag and a Last-Modified value." > http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.3.4 > > A server may also legitimately not send any cache information if it > doesn't want its responses to be cached. When no cache information is > sent, a strictly-complying user agent must assume that what it has in > its cache is stale. In this case the UA can still use what is in its > cache ("A client MAY also specify that it will accept stale > responses...") and some browsers do so very aggresively to improve > performance. > http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.1.6 > > > > The best, of course, will be to use Last-Modified > > and etag, but I'm not sure how reliable they are. > > Good news -- it isn't your job to decide how reliable they are. If the > server sends out this information, your user agent must respect it or > be in violation of RFC 2616. If the information looks odd (e.g. a > Last-Modified date of 1 second ago along with an ETag that's the same > as the one you saw one month ago), that's the business of the server > admin. Caching is complicated enough without trying to second-guess > what the server sends out. =) > > Good luck > > -- > Philip > http://NikitaTheSpider.com/ > Whole-site HTML validation, link checking and more >
Received on Thursday, 15 November 2007 18:49:33 UTC