Overview / Web Technology
Web technology reference for developers
HTML
Structure of content on the web
CSS
Code used to describe document style
JavaScript
General-purpose scripting language
HTTP
Protocol for transmitting web resources
Web APIs
Interfaces for building web applications
Web Extensions
Developing extensions for web browsers
Accessibility
Build web projects usable for all
Web Technology
Web technology reference for developers
æ¤é¡µé¢ç±ç¤¾åºä»è±æç¿»è¯èæ¥ãäºè§£æ´å¤å¹¶å å ¥ MDN Web Docs 社åºã
Filter sidebar
卿¬æä¸FetchEvent
clientId
handled
isReload
éæ å å·²å¼ç¨preloadResponse
replacesClientId
request
resultingClientId
Cache
CacheStorage
Client
Clients
ExtendableEvent
ExtendableMessageEvent
InstallEvent
NavigationPreloadManager
Navigator.serviceWorker
ServiceWorker
ServiceWorkerContainer
ServiceWorkerGlobalScope
ServiceWorkerRegistration
Window.caches
WindowClient
WorkerGlobalScope.caches
WorkerNavigator.serviceWorker
ä½¿ç¨ Service Worker
Baseline Widely available
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since April 2018.
FetchEvent
æ¥å£ç clientId
åªè¯»å±æ§ï¼è¿åç±å½å service worker æ£å¨æ§å¶ç Client
ç idã
ç¶åå¯ä»¥å°æ¤ ID ä¼ éç» Clients.get()
æ¹æ³ä»¥æ£ç´¢ç¸å
³èç客æ·ç«¯ã
ä¸ä¸ªå符串ï¼è¡¨ç¤ºå®¢æ·ç«¯ç IDã
示ä¾js
self.addEventListener("fetch", (event) => {
console.log(event.clientId);
});
è§è Specification Service Workers Promise
.
This page was last modified on 2023å¹´7æ30æ¥ by MDN contributors.
View this page on GitHubâ¢
Report a problem with this contentRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4