0

在浏览器中测试Service Worker功能时:

(在index.html

if ('serviceWorker' in navigator) {
    console.log('serviceWorker OK');
} else {
    console.log('serviceWorker NOT OK');
}

现在,如果我打电话localhost/index.html,我会得到一个积极的结果:

=> serviceWorker 好

使用环回 ( 127.0.0.1/index.html) 时相同。

现在,如果我mymachine.local/index.html突然打电话,能力就会消失:

=> serviceWorker 不好

Avahi /Zeroconf 限制,还是只是我的操作系统实现的问题?

4

0 回答 0