4 ms·
Wasn't originally intended use for server push, something like this? 1) Load page through javascript-enabled browser (headless chrome, etc), and record resourc
by nousermane 4y ago
Wasn't originally intended use for server push, something like this?
1) Load page through javascript-enabled browser (headless chrome, etc), and record resources accessed from the same server;
2) Save this list somewhere, where server can read it, keyed by URL;
3) When user requests same URL, push resources from the list.
- jefftk 4y agoThat's the idea that led to implementing server push. Lots of people it, and it turns out not to work very well. There's too much variation in what people will already have in their caches and the server is not great at predicting the order in which clients will need the resources.
- deleted 4y ago[deleted]
- saurik 4y agoI'm just still shocked that this wasn't obvious to more people before: it isn't like you even need to have implemented this feature to do the instrumentation required to know whether this would work, and it frankly had always seemed like a long shot.
- vbezhenar 4y agoClient can send bloom filter with first request.
- mmis1000 4y agoAns it turns out the way this was implemented didn't really works well. There just isn't a universal format that you can generate the list and upload it to server/cdn/whatever. No one ever figure out how to actually use this list to generate a http2 server push from a common platform/cdn. The alternative (Service worker/<meta> preferch/preload tags) on other hand are much easier to handle although have one extra round trip. Because they are just text files that you need to upload to the server.
- 0x457 4y agoI think it was something much simpler: oh, you're navigating to `index.html` without session? You're going to need this CSS, JS and PNG files as well. And the idea is that client would already have those files by the time browsers parses `<head>` it already has them all. Except...browser cache exists, so who cares.