HTTP/2.0 in browser: How does Browser cancel Serve

2019-09-04 10:24发布

问题:

I've read documentation of HTTP/2.0 and I know that it is possible to fully terminates the referenced stream by using the RST_STREAM frame. Here's (https://http2.github.io/http2-spec/)!

How can I implement this feature in a web browser like Google Chrome or Firefox?

回答1:

As a browser user or web app developer (HTTP/Javascript) you can't. There is no public API for this, or to interact with server push in general. The possibility to do this is probably implemented in the network stack of the browser (somewhere deep within the Chrome/Firefox code).