tgvashworth / ServiceWorker-Polyfill

[DEPRECATED] JavaScript ServiceWorker implementation, enabling exploration by authors.
66 stars 7 forks source link

Stop non-matching glob registration re-registering itself when receiving multiple navigation fetches #42

Open ahume opened 10 years ago

ahume commented 10 years ago

Register

navigator.registerServiceWorker('/foo/', 'worker.js');

Everytime /index.html with the above code loads it re-installs the worker. It does correctly ignore subsequent fetch events, bit it should only be installed once.

tgvashworth commented 10 years ago

I think the bug here is that we're getting registrations from the registry based on worker URL, not matched glob.