Can you explain why a hint should be preferred to a "primary" resource? I don't really undertsand.
However supporting an additional header to indicate how resources should be transfered would be a good thing. This setting would apply to resources added to the PushBuilder, right? 2015-03-31 12:47 GMT+02:00 Simone Bordet <[email protected]>: > Hi, > > On Tue, Mar 31, 2015 at 11:08 AM, Guillaume Drouet <[email protected]> > wrote: > > Hi, > > > > There is an interesting answer from Simon Bordet on stackoverflow > regarding > > server push exchanges: > > > http://stackoverflow.com/questions/29352282/do-browser-cancel-server-push-when-resource-is-in-cache/29354100#29354100 > > > > So, server starts pushing some resources that could be already in the > client > > cache. When the browser detects the promised push is related to a cached > > value, it cancels it, possibly after that the transfers starts. We can > say > > that's the most efficient way to reduce latency and consequently to > improve > > user experience. > > > > Another technique is server-hints, which let the browser check if the > > resources referenced in the link header's page exist in the cache before > > loading it. We can't say that it's faster than server-push because > > additional exchange are required before the resource transfer starts. > > However it still very fast with HTTP/2 because the browser takes > advantage > > from multiplexing. Moreover, it consumes only the bandwidth it really > needs > > and should consume less CPU cycles than server push which often needs to > > perform a push cancellation. > > > > Do you consider that server-hints are absolete considering server-push > > capacity? I'm not convinced of that since an overhead is associated to > > server-push. HTTP/2 wants to optimize data transfer and consequently > improve > > our battery life, which is not the case if our devices consume more > > bandwidth and CPU than necessary. > > > > In practice, we really need to compare the two techniques in real life > > project to see how server-push is faster that server-hints and how > > server-hints is economical comparing to server-push, but before this I > want > > to know your opinion. > > Indeed, benchmarks will be needed for this. > > I can see value in server hints, but I feel they are cumbersome to add > manually. > During the maintenance of a page, where resources such as CSS, JS or > images may be renamed, added or removed, you don't want to track this > manually, you want the container (or some other automation) to do this > for you. > > However, perhaps the push mechanism may be converted to the hint > mechanism when the client is requesting the primary resource. > For example: > > GET /primary.html HTTP/2 > HTTP2-Push: hint > > The additional "HTTP2-Push" header tells the server how it wants > pushes to be handled: could be "push" (i.e. send the pushes), "hint" > (i.e. send hints), or "none" (i.e. push is completely disabled). > > When the container enters the push code, it can look at the request of > the primary resource, see if it has the "HTTP2-Push" header, and > either send PUSH_PROMISES or add "Link:" headers to the response. > > This would be trivial to implement. > > -- > Simone Bordet > ---- > http://cometd.org > http://webtide.com > http://intalio.com > Developer advice, training, services and support > from the Jetty & CometD experts. > Intalio, the modern way to build business applications. > _______________________________________________ > jetty-users mailing list > [email protected] > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/jetty-users > -- Guillaume DROUET
_______________________________________________ jetty-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
