GoogleChromeLabs / sw-precache

[Deprecated] A node module to generate service worker code that will precache specific resources so they work offline.
https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
Apache License 2.0
5.22k stars 388 forks source link

Remove the hash fragment the URL when determining if there's a match. #291

Closed jeffposnick closed 7 years ago

jeffposnick commented 7 years ago

R: @addyosmani @gauntface

Fixes #290

jeffposnick commented 7 years ago

I think that's the right place to the tweaking, since we're already constructing the URL object and manipulating it there. What if I renamed the function from stripIgnoredUrlParameters to cleanUrl or something like that to reflect the fact that it's doing more than manipulating the search value?

It doesn't need a parameter to toggle the behavior. The hash should be unconditionally stripped.