“Corrupted Content Error” on Firefox with Polymer/Firebase

时光怂恿深爱的人放手 提交于 2019-12-06 13:53:46

问题


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’

The service-worker.js is auto-generated by the polymer-cli (v0.16.0).


回答1:


To address this known issue, set the redirect option to follow in your service worker's fetch() requests:

fetch(..., { redirect: 'follow' })


来源:https://stackoverflow.com/questions/40274429/corrupted-content-error-on-firefox-with-polymer-firebase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!