Baseline Widely available
updateViaCache
㯠ServiceWorkerRegistration
ã¤ã³ã¿ã¼ãã§ã¤ã¹ã®èªã¿åãå°ç¨ããããã£ã§ã ServiceWorkerContainer.register
ã®å¼ã³åºãã§æå®ãããã¢ã¼ãã使ç¨ãã¦ãã£ãã·ã¥ãæ´æ°ãã¾ãã importScripts
ã®ãªã¯ã¨ã¹ã㯠HTTP ãã£ãã·ã¥ã§è¡ããã¾ãã updateViaCache
ã¯ãã®åä½ãå¶å¾¡ãã¾ãã
以ä¸ã®å¤ã®ä½ãããè¿ãã¾ãã
imports
: ãµã¼ãã¹ã¯ã¼ã«ã¼ã®æ´æ°ã®ããã« HTTP ãã£ãã·ã¥ã¯åç
§ããã¾ãããã importScripts
ã§ã¯åç
§ããããã¨ãæå³ãã¾ããall
: 両æ¹ã®å ´åã§ HTTP ãã£ãã·ã¥ãåç
§ããããã¨ãæå³ãã¾ããnone
: HTTP ãã£ãã·ã¥ãåç
§ãããªããã¨ãæå³ãã¾ããæ¬¡ã®ä¾ã¯ã updateViaCache ã®ä½¿ç¨ä¾ã§ãã
if ("serviceWorker" in navigator) {
navigator.serviceWorker
.register("/service-worker.js", {
updateViaCache: "none",
})
.then((registration) => {
registration.addEventListener("updatefound", () => {
// If updatefound is fired, it means that there's
// a new service worker being installed.
console.log(`Value of updateViaCache: ${registration.updateViaCache}`);
});
})
.catch((error) => {
console.error(`Service worker registration failed: ${error}`);
});
}
仿§æ¸ ãã©ã¦ã¶ã¼ã®äºææ§ é¢é£æ
å ±
RetroSearch 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