4 ms·
I don't think that the server is in charge of priorisation here. The server can do it, but there is no reason to push this responsibility onto the server when t
by wongarsu 10y ago
I don't think that the server is in charge of priorisation here. The server can do it, but there is no reason to push this responsibility onto the server when the browser can do it much better (for example the server can't know what's in the viewport).
I expect this will be quickly sorted out by more mature HTTP/2 implementations in browsers. Downloading every image at once is obviously a bad idea, and I expect such naive behaviour will soon be replaced by decent heuristics (even just downloading eight resources at once should be better in nearly all cases)
- foota 10y agoI think the real solution hear is for the browser to be able to communicate some sort of priority to the server, without having to download a limited number of files at once.
- xzyfer 10y agoBrowser do currently do this. H2 has two types of prioritisations: weighted, and dependency. All browsers implement weighted resource prioritisation and weigh resources by content type. This is a hold over from what they do for HTTP/1 connections. Firefox has dependency resources prioritisation. https://bitsup.blogspot.com.au/2015/01/http2-dependency-priorities-in-firefox.html https://bitsup.blogspot.com.au/2015/01/http2-dependency-prio... The spec purposely leave how these heuristics should work to the implementor. Things will change and implementations will diverge over time. The server ultimately being in control means we can tell the server what resources are important for specific pages with absolute knowledge of the page.
- foota 10y agoOh wow, that's cool. Do you know if servers currently support this? Would this mostly be useful on a network level or do you think it would also be useful for like trying to be more intelligent about scheduling?
- xzyfer 10y agoIt's hard to say for sure. Server implementations can vary wildly, make sure to test any implementation closely. I know from talking to CloudFlare that their implementation respects browser hints. Their implementation is also open source.