3 ms·
ETags can be anything -- they aren't required to be a hash of the content. Thinking about this problem, why does the browser expose any information about what'
by irq-1 4y ago
ETags can be anything -- they aren't required to be a hash of the content.
Thinking about this problem, why does the browser expose any information about what's in the cache? Client-side JavaScript can't tell what's in the cache because it's an obvious security issue. Why let the server know?
Browsers should ask for the hashes on a list of content without exposing their cache contents. Then the browser can request anything thats changed.
- jefftk 4y agoThe way If-None-Match is that the browser says "give me the latest if this ETag represents an out-of-date resource, otherwise I'll keep using my copy." It's not clear to me how you're proposing this work instead? (Also, in many cases the server uses a hash of the inputs to generating the resource, which isn't something externally verifiable)