[Bug 4998] Validator sometimes uses cached content (cache-control header on requests would be useful)

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4998

           Summary: Validator sometimes uses cached content (cache-control
                    header on requests would be useful)
           Product: Validator
           Version: 0.8.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: check
        AssignedTo: dave.null@w3.org
        ReportedBy: bugs@timj.co.uk
         QAContact: www-validator-cvs@w3.org


The Validator does not explicitly request non-cached content when it requests a
page for validation. Although not actually wrong per se, this produces
counter-intuitive and confusing results and makes it difficult to use the
Validator for useful development purposes if there happens to be a caching
proxy between the Validator and the target site, because as one fixes
validation errors, it's impossible to see the results because the Validator
will keep seeing the older cached version, until the cache expires.

This could be easily fixed by adding a Cache-control header to the HTTP request
that the Validator makes; for example "Cache-control: max-age=0" would probably
serve the purpose. If adding this to every request made the developers
uncomfortable, it could be made a UI option (e.g. "Request uncached version?"
or something), and/or a config file option although to be honest I can't see
the downside of simply adding it to every request; it's rarely that someone is
going to actually want to see the results of validation on a possibly
out-of-date cached copy.

I have verified that the Validator does not do this on v0.8.1; a typical HTTP
request from the Validator looks like this:

GET / HTTP/1.1
TE: deflate,gzip;q=0.3
Connection: TE, close
Host: example.com
User-Agent: W3C_Validator/1.555

Received on Friday, 31 August 2007 10:06:54 UTC