Web/API/PerformanceResourceTiming/nextHopProtocol

From Get docs


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.

Note: This feature is available in Web Workers.

Syntax

resource.nextHopProtocol;

Return value

A string representing the network protocol used to fetch the resource, as identified by the ALPN Protocol ID (RFC7301).

Example

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");
}

Specifications

Specification Status Comment
Resource Timing Level 2The definition of 'nextHopProtocol' in that specification. Working Draft Initial definition.

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
nextHopProtocol Chrome

Full support 61

Edge

Full support 17

Firefox

Full support 45

IE

No support No

Opera

No support No

Safari

No support No

WebView Android

Full support 61

Chrome Android

Full support 61

Firefox Android

Full support 45

Opera Android

No support No

Safari iOS

No support No

Samsung Internet Android

Full support 8.0

Legend

Full support  
Full support
No support  
No support