Skip to content Skip to sidebar Skip to footer

What Happens When Triggering A Get Request While A Http2 Push Is In-flight For The Same Resource

What happens when triggering a single GET request, while simultaneously a http2 push is in-flight for the same resource? What is the specified behavior and what do the browsers act

Solution 1:

The HTTP/2 specification in RFC 7540 says:

Once a client receives a PUSH_PROMISE frame and chooses to accept the pushed response, the client SHOULD NOT issue any requests for the promised response until after the promised stream has closed.

So it seems to be likely that the request will wait for the push response to be delivered, if the server does not take too long to start sending:

If the client determines, for any reason, that it does not wish to receive the pushed response from the server or if the server takes too long to begin sending the promised response, the client can send a RST_STREAM frame, using either the CANCEL or REFUSED_STREAM code and referencing the pushed stream's identifier.

Post a Comment for "What Happens When Triggering A Get Request While A Http2 Push Is In-flight For The Same Resource"