Add exceptions to the serviceworker code to fix redirects (#7156)

* Add exceptions to the serviceworker code to fix redirects
This commit is contained in:
Anna Buianova 2020-04-08 18:54:10 +03:00 committed by GitHub
parent 2048bf00f7
commit 2f9d6eab48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -122,6 +122,12 @@
!url.href.includes('/search/classified_listings') &&
!url.href.includes('/search/users') &&
// Don't run on redirects
!url.href.includes('/workshops') &&
!url.href.includes('/%F0%9F%92%B8') && // 💸 (hiring)
!url.href.includes('/podcasts') &&
!url.href.includes('/p/rlyweb') &&
caches.match('/shell_top') && // Ensure shell_top is in the cache.
caches.match('/shell_bottom')) { // Ensure shell_bottom is in the cache.
event.respondWith(createPageStream(event.request)); // Respond with the stream