4 ms·
Doesn‘t that mean I‘ll get all assets pushed to my client every time I visit any page of your site, regardless of the file‘s cache status? That does not seem t
by realityking 9y ago
Doesn‘t that mean I‘ll get all assets pushed to my client every time I visit any page of your site, regardless of the file‘s cache status?
That does not seem to be a good tradeoff, especially on mobile.
- StavrosK 9y agoNo, the browser cancels the download if it has the assets before they download.
- _jn 9y agoThat should take approximately as long as a client<->server ping, right? So shouldn't it be irrelevant for JS/CSS that loads within that time (say, 50Mbps & 15ms ping --> everything below 93KB gzipped?)
- StavrosK 9y agoYes, you'd download some things you don't need to. Last I heard, they're working on an extension so the browser can tell the server what media it has when it requests the initial page so they won't get sent at all.
- tomatsu 9y agoYou could use a cookie which contains the revision and then the server could selectively push things which have changed since then.
- majewsky 9y agoDidn't we all have this conversation years ago already with nocache query parameters etc.? Reminds me of number 6 in RFC 1925: "It's easier to move a problem around [to another protocol layer] than to solve it." I still don't see how HTTP/2 Push is solving any real-world problems [1] besides Google being able to push ads so that it counts as an impression even if the client blocks ads. [1] I don't count the slightly faster initial page load since I'm getting that junk on every page load via push even if I already have it, so I'm paying with my data allowance. If you want your site to load fast, just fix your goddamn bloat.
- abritinthebay 9y agoIf you specifically discount the very problem it was meant to solve then yes, yes then there it is not solving "anything"
- paulirish 9y agoUnfortunately it doesn't. There is no mechanism right now for the browser to cancel the pushed resources. H2 Push's Cache Digest will introduce this ability, but it's still being designed.
- StavrosK 9y agoAre you sure? SO seems to disagree: https://stackoverflow.com/questions/29352282/does-the-browser-cancel-server-push-when-a-resource-is-in-cache https://stackoverflow.com/questions/29352282/does-the-browse... And this feature shows as merged into ff56: https://bugzilla.mozilla.org/show_bug.cgi?id=1367551 https://bugzilla.mozilla.org/show_bug.cgi?id=1367551 Cache digests are about the client telling the server what items it has cached so push doesn't even start, not about canceling pushes.