“损坏的内容错误";在带有Polymer/Firebase的Firefox上 [英] "Corrupted Content Error" on Firefox with Polymer/Firebase
问题描述
我有一个Polymer应用程序,其中服务人员托管在Firebase上.该应用程序可在除Firefox之外的所有浏览器上正常运行.当您尝试在初始加载后刷新Firefox中的浏览器时(有效),它将引发以下错误:
I have a Polymer app with service workers hosted with Firebase. The app works fine on every browser except Firefox. When you try to refresh the browser in Firefox after initial load (which works), it throws the following error:
A ServiceWorker passed a redirected Response to FetchEvent.respondWith() while RedirectMode is not ‘follow’
service-worker.js
由polymer-cli
(v0.16.0)自动生成.
The service-worker.js
is auto-generated by the polymer-cli
(v0.16.0).
推荐答案
要解决此问题设置为follow
工作者的 fetch()
请求:
To address this known issue, set the redirect
option to follow
in your service worker's fetch()
requests:
fetch(..., { redirect: 'follow' })
这篇关于“损坏的内容错误";在带有Polymer/Firebase的Firefox上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!