Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google chrome 从applicationCache迁移(Chrome M82)_Google Chrome_Service Worker_Html5 Appcache - Fatal编程技术网

Google chrome 从applicationCache迁移(Chrome M82)

Google chrome 从applicationCache迁移(Chrome M82),google-chrome,service-worker,html5-appcache,Google Chrome,Service Worker,Html5 Appcache,我正在尝试使用Chrome/Chrome的服务工作者来补充现有的基于离线appCache的设置(其他浏览器,即Safari,仍希望使用appCache) 简化的[伪]代码如下所示: <html manifest="offline.manifest"> ... <script type="text/javascript"> if (!window.applicationCache && navigator.serviceW

我正在尝试使用Chrome/Chrome的服务工作者来补充现有的基于离线appCache的设置(其他浏览器,即Safari,仍希望使用appCache)

简化的[伪]代码如下所示:

<html manifest="offline.manifest">
    ...
     <script type="text/javascript">
         if (!window.applicationCache && navigator.serviceWorker && (/chrome/gi).test(navigator.appVersion)) {
             navigator.serviceWorker.register('/service-worker.js');
         }
     </script>
    ...
</html>

...
if(!window.applicationCache&&navigator.serviceWorker&&(/chrome/gi).test(navigator.appVersion)){
register('/service-worker.js');
}
...
我的问题是:

  • 有没有办法确定Chrome 82是否会容忍
    属性?(在撰写此问题时,安装Chrome 82 Canary report appCache的用户仍然可用)
  • 是否有人有机会在生产中使用sw appcache行为脚本
谢谢


UPD 08/05/20:AppCache删除已移至M85,HTML规范中提供了一些提示

看起来,manifest属性仍将得到尊重,但不会发生实际的缓存

似乎有一种方法可以使用[reverse]Origin试用版测试禁用的appCache。 有关详细信息,请访问BlinkAPI所有者Google Group

尽管Chrome维护人员对sw appcache行为进行了测试,但其自述部分表明它还不打算在Prod中使用。

Chrome 84 beta版具有appcache web API和可用于测试的浏览器后端