Add explaining comment
This commit is contained in:
parent
57e2c4ea45
commit
8fba3f4ca9
1 changed files with 5 additions and 0 deletions
|
@ -69,6 +69,11 @@ async function purgeOldCaches() {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.addEventListener('fetch', (event) => {
|
self.addEventListener('fetch', (event) => {
|
||||||
|
/*
|
||||||
|
service worker shouldn't handle xhr uploads because otherwise
|
||||||
|
the progress events won't fire.
|
||||||
|
This has to do with xhr not being supported in service workers.
|
||||||
|
*/
|
||||||
if (event.request.method === "GET") {
|
if (event.request.method === "GET") {
|
||||||
event.respondWith(handleRequest(event.request));
|
event.respondWith(handleRequest(event.request));
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue