|Re: [jetty-users] Server Hint vs Server Push|
Hi, On Tue, Mar 31, 2015 at 2:10 PM, Guillaume Drouet <guidrouet@xxxxxxxxx> wrote: > Can you explain why a hint should be preferred to a "primary" resource? I > don't really undertsand. I did not say that a hint is preferred to a primary resource. What I mean by: GET /primary.html HTTP/2 HTTP2-Push: hint is the client telling the server: "GET me /primary.html. If it happens that primary.html has associated resources that you can push, then please don't push them to me, but send me back hints in the form of Link headers". The response would be: HTTP/2 200 Link: </css/styles.css>; rel=prefetch Link: </js/jquery.js>; rel=prefetch Link: </css/background.png>; rel=prefetch Content-Length: 65536 Content-Type: text/html; charset=UTF-8 ... The client would receive the headers, parse them, and can prefetch the resources (or look at its cache) before it actually receives the HTML content that defines those resources. If the server sends, for example, etag information in the Link header, the client may do even more precise decisions. -- 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.
Back to the top