1

Are there any specific spec'd processes that a browser client can use to dynamically encourage a server to push additional requested items into the browser cache using HTTP/2 server push before the client needs to actually use them (not talking about server-side events or WebSockets, here, btw, but rather HTTP/2 server push)?

2 Answers 2

1

There is nothing (yet) specified formally for browsers to ask a server to push resources.

A browser could figure out what secondary resources needs to render a primary resource, and may send this information to the server opportunistically on a subsequent request with a HTTP header, but as I said, this is not specified yet.

[Disclaimer, I am the Jetty HTTP/2 maintainer] Servers, on the other hand, may learn about resources that browsers ask, and may build a cache of correlated resources that they can push to clients.

Jetty provides a configurable PushCacheFilter that implements the strategy above, and implemented a HTTP/2 Push Demo.

Sign up to request clarification or add additional context in comments.

1 Comment

For Mozilla browsers, the best for now might be statically or dynamically adding prefetch (see developer.mozilla.org/en-US/docs/Web/HTTP/Link_prefetching_FAQ ), but this apparently would occur in multiple HTTP requests.
1

The objective of server push is that the server send additional files (e.g. javascripts, css) along with the requested URL (e.g. an HTML page) to the browser before the browser knows what related files are required, thus saving a round-trip and improve webpage load speed. If the browser already know what resources are needed it can request with normal HTTP calls.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.