I’m learning http/2 and have a question about caching.
The PUSH_PROMISE frame gives to the client the request headers, but does it give the client any way to judge whether what’s “PROMISE”d is, in fact, what the client has cached?
Specifically: could PUSH_PROMISE send along something like the Etag, then the client would decide whether it needs to request a new copy of the resource?
Client requests page, receives
Client requests page again. Server starts pushing
foo.jsand sends the Etag
123qwe. Client sees that it already has that version of
foo.jscached and sends a RST_STREAM to cancel the send.
A while later, client requests page again. Server starts pushing
foo.jsbut this time sends Etag
234wer. The client sees that
foo.jshas changed, so it accepts the newly-pushed version of the file.
Is there nothing like this in place? Or do we just have to continue with the old URL-based cache expiration hacks?