“Corrupted Content Error” on Firefox with Polymer/

2019-04-16 00:30发布

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条回答
不美不萌又怎样
2楼-- · 2019-04-16 00:51

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

fetch(..., { redirect: 'follow' })
查看更多
登录 后发表回答