Created
April 16, 2022 14:44
-
-
Save tangoabcdelta/b028f9ac928815e5ce3535bec19a7c35 to your computer and use it in GitHub Desktop.
determine if spdy or http2 was used to fetch website
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.performance.getEntriesByType("resource").filter(p => 'nextHopProtocol' in p)[0].nextHopProtocol // 'h2' | |
// deprecated | |
// https://chromestatus.com/feature/5637885046816768 | |
window.chrome.loadTimes().wasFetchedViaSpdy; // true | |
window.chrome.loadTimes().npnNegotiatedProtocol; // 'h2' | |
window.chrome.loadTimes().connectionInfo; // 'h2' | |
// If you're in an older machine OR browser, then | |
// Go to chrome://net-internals/#http2 | |
// Open the network observation component | |
// Then select HTTP/2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment