FetchEvent.resultingClientId

resultingClientIdFetchEvent インターフェイスの読み取り専用プロパティで、ページナビゲーション中に前のクライアントを置き換えるクライアントid です。

例えば、ページ A からページ B に移動する場合、resultingClientId はページ B に関連するクライアントの id です。

フェッチリクエストがサブリソースのリクエストであるか、リクエストの宛先 (destination) が report である場合、resultingClientId は空文字列になります。

文字列です。

js
self.addEventListener("fetch", (event) => {
  console.log(event.resultingClientId);
});

仕様書

Specification
Service Workers
# fetch-event-resultingclientid

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
resultingClientId

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support

関連情報