nextHopProtocol
read-only property is a
string
表示
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.
注意: 此特征可用于 Web 工作者 .resource.nextHopProtocol;
A
string
表示
network protocol
used to fetch the resource, as identified by the
ALPN Protocol ID (RFC7301)
.
以下范例使用
nextHopProtocol
特性。
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");
}
| 规范 | 状态 | 注释 |
|---|---|---|
|
Resource Timing Level 2
The definition of 'nextHopProtocol' in that specification. |
工作草案 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
nextHopProtocol
|
Chrome 61 | Edge 17 | Firefox 45 | IE No | Opera No | Safari No | WebView Android 61 | Chrome Android 61 | Firefox Android 45 | Opera Android No | Safari iOS No | Samsung Internet Android 8.0 |
完整支持
不支持
PerformanceResourceTiming