The nextHopProtocol
read-only property is a string
representing the network protocol used to fetch the resource, as identified by the ALPN Protocol ID (RFC7301).
When a proxy is used, if a tunnel connection is established, this property returns the ALPN Protocol ID of the tunneled protocol. Otherwise, this property returns the ALPN Protocol ID of the first hop to the proxy.
resource.nextHopProtocol;
A string
representing the network protocol used to fetch the resource, as identified by the ALPN Protocol ID (RFC7301).
The following example uses the nextHopProtocol
property.
function print_PerformanceEntries() { // Use getEntriesByType() to just get the "resource" events var p = performance.getEntriesByType("resource"); for (var i=0; i < p.length; i++) { print_nextHopProtocol(p[i]); } } function print_nextHopProtocol(perfEntry) { var value = "nextHopProtocol" in perfEntry; if (value) console.log("nextHopProtocol = " + perfEntry.nextHopProtocol); else console.log("nextHopProtocol = NOT supported"); }
Specification | Status | Comment |
---|---|---|
Resource Timing Level 1 The definition of 'nextHopProtocol' in that specification. | Candidate Recommendation | Initial definition. |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | 61 | 17 | 51 | No | No | No |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | 61 | 61 | 17 | No | No | No | No |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/nextHopProtocol