Skip to content

Commit 14ae675

Browse files
committed
add youdao and searchcode to sw hosts
1 parent c306be3 commit 14ae675

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎lib.config.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ exports.extra = [{
2020

2121
exports.serviceWorker = {
2222
hosts: [ // cache hosts for service worker, get request only, cache then network
23+
'"searchcode.com"',
24+
'"fanyi.youdao.com"'
2325
],
2426
excludedPaths: [ // exclude cache path for service worker, get request only, network-falling-back-to-cache
2527
]

‎src/sw.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,5 @@ if ('storage' in navigator && 'estimate' in navigator.storage) {
223223
});
224224
}
225225

226+
// debug with chrome
227+
// /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/tmp/foo --ignore-certificate-errors --unsafely-treat-insecure-origin-as-secure=https://localhost:1123

0 commit comments

Comments
 (0)