Hacker News new | ask | show | jobs
by callum85 3931 days ago
Getting slightly off topic, but I'm confused about an aspect of server push (maybe you can help). Even on HTTP/1, the client typically only downloads assets on the first page load for a given website, then it caches them. Subsequent requests for other pages are much quicker because the assets don't need to be downloaded again. With server push, would the server typically send all linked assets on every request? Or can it somehow keep track of which clients have cached which assets, and avoid wasting bandwidth?
2 comments

Yes that would be one possible implementation. It's up to the server and can vary quite a bit depending on the scenario, which is why Nginx hasn't tackled the problem yet.

I believe that it's going to take a while to find good heuristics that work in most of the cases. Until then only big companies like Google will have the financial incentive to develop their own custom version that's tailored to their specific use-case.

The browser can cancel the stream after the first "stream open" frame (assuming latency isn't too high, obviously)