Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Chrome DevTools, how can you tell which responses were sent using HTTP/2 server push?

HTTP/2 server push allows a server to "push" resources to the browser before the browser has actually requested them.

When using the network tab of the Chrome DevTools, how can I tell which resources were "pushed" vs. ones that were requested in the traditional way?

I know that I can enable the Protocol column in the network tab, and that shows some calls as "h2" which I assume means HTTP/2. But what do I look for to tell whether it was actually pushed?

enter image description here

like image 726
antun Avatar asked Feb 22 '19 18:02

antun


People also ask

How can I tell if HTTP 2 is used?

Google Chrome offers a quick and easy way to check if HTTP/2 is supported on your SSL-enabled site. First, visit your site in Chrome over HTTPS. There you'll see your site listed with protocol h2, confirming your site works over HTTP/2.

How do I view HTML responses in Chrome?

Access Developer ToolsRight-click a page and select "Inspect Element". This displays the HTML code for the element you clicked. Select View > Developer > Developer tools.

Where you can see the requests and responses in the developer tools?

Right click -> inspect -> then you will have the chrome dev tools just by selecting networks you can filter what's the browser is loading also you can see the http request going through your application.


1 Answers

Look for Push in the Initiator column. See image.jpg in the screenshot below.

Network Log

Hovering over the Waterfall also shows a breakdown of the push-related activity.

Waterfall

I know that I can enable the Protocol column in the network tab, and that shows some calls as "h2" which I assume means HTTP/2.

Yes, this is correct. h2 stands for HTTP/2. As mentioned, the Protocol column is hidden by default. Right-click the table header and select Protocol to enable it. See Show more information for an example.

like image 147
Kayce Basques Avatar answered Nov 16 '22 18:11

Kayce Basques