我正在使用的一名服务人员为我的网站服务。
缓存第一网络服务工作者JS文件包含以下代码:
// This is the service worker with the Cache-first network
const CACHE = "pwabuilder-precache";
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.0.0/workbox-sw.js');
self.addEventListener("message", (event) =&
这是我的服务工作者:
// This is the "Offline page" service worker
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
const CACHE = "pwabuilder-page";
// TODO: replace the following with the correct offline fallback page i.e.: const offlineFallb
我正在使用NUXT-PWA缓存我的数据,但是我有一个依赖于要构建的POST请求的页面,我需要缓存JSON响应,但我得到了以下错误:
Uncaught (in promise) attempt-to-cache-non-get-request: Unable to cache '/api/hotel/order/get-voucher' because it is a 'POST' request and only 'GET' requests can be cached.
我在workbox-range-request.js中使用的代码如下:
w
我试图使用工作框添加PWA功能到我的网站。我正在遵循指南,但我并没有走远。当我使用Chrome运行网站时,我会发现以下错误:
Refused to load the script 'https://storage.googleapis.com/workbox-cdn/releases/3.6.1/workbox-sw.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval'".
我有一个Vue PWA应用程序,在我们的错误日志中,我看到一个特定用户的数百个这样的应用程序(我和另一个人无法复制)。 Failed to update a ServiceWorker for scope ('https://myapp.com/') with script ('https://myapp.com/service-worker.js'): A bad HTTP response code (400) was received when fetching the script. 当我转到该URL时,服务工作者JS文件就会出现。 在我的vue.co