The browser bugs and edge cases of HTTP/2 push
jakearchibald.com
jakearchibald.com
Actually, good web engineer interview question might be how many caches there are in a web request. A good interview could easily end up with 20 on the whiteboard.
( Application DNS cache) -> ( libc DNS cache ) -> ( gateway DNS cache ) -> ( DNS caching resolver cache ) -> ( DNS nameserver authoritative cache ) -> Filesystem Cache -> Hard disk Device Cache -> ( JavaScript JIT cache ) -> HTTP cache -> HTTP push cache -> HTTP Preload cache -> CPU L1 -> CPU L2 -> (CPU L3) -> ( HTTP proxy cache ) -> (N hops invoking many of these steps N times) -> ( HTTP router/relay cache ) -> ( HTTP Reverse Proxy cache ) -> HTTP Server request caching.
Because on some hops almost all of them are invoked for a request, we aren't looking at 20 caches, we are looking at hundreds.
If you are on mobile with limited GB (or expensive GBs) as it's always the case, push can cause some heavy resources to be sent to you even after you have them in the local cache.
The browser can cancel the stream, but once the stream is already arriving.
I am aware that there are cookie-based hacks, but... I really don't understand why this didn't come up as a possible problem earlier during SPDY test etc.
On the other hand, the browser's HTTP cache is well understood and standardised, and just requires sending the correct response headers (at the cost of the additional round trip).
I'm wondering how long before the cache digest is used as a fingerprinting mechanism.
Also, I don't think servers give us the correct priority control to replace inlining. As things currently stand, if you spend bandwidth sending the body of a page over pushing the critical CSS, you'll be slower than inlining.
Not the damn CPU usage, not the enormous RAM consumption.