Content deleted Content added
Saaswriter (talk | contribs) Added intro language to Basic concept |
No edit summary |
||
Line 27:
When the server wants to push a resource, it prepares a PUSH_PROMISE frame, architecting it in the best way possible to seduce the browser into using the pushed contents. Then the server annexes the PUSH_PROMISE frame to the response part of a normal, browser-initiated stream. However, the actual data for the pushed resource is sent in a fresh stream started by the server{{thinsp|—}}and thus with an even number.
The browser holds the pushed data in a temporary "quarantine" zone until it decides to use it. Later, every time the browser is going to
Here is how this would work in the previous example. If the server is HTTP/2 PUSH ready, when it receives a request to index.html it can forecast that requests to styles.css and script.js are following close in tail. So it issues push promises to get a bit ahead of events. Here is how things could look, in order of occurrence and making up the stream numbers:
|