Remove /new from serviceworkers (#7967)

* Remove /new from serviceworkers

* Use pathname
This commit is contained in:
Ben Halpern 2020-05-19 18:04:22 -04:00 committed by GitHub
parent c02a103c7f
commit 59765d339f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,6 +95,8 @@
event.request.method == "GET" && // Don't fetch on POST, DELETE, etc.
!event.request.referrer.includes('/signout_confirm') && // If this is the referrer, we instead want to flush.
url.pathname !== '/new' && // We have no shell for /new
!url.href.includes('i=i') && // Parameter representing "internal" navigation.
!url.href.includes('.css') && // Don't run on CSS.
!url.href.includes('.js') && // Don't run on JS.