You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting a different cache name prefix on each only affects the name of the cache, which already contains the URL of the directory where the service worker is hosted. The IndexedDB is always named workbox-precaching and contains no information about which subdirectory the service worker is hosted in.
The text was updated successfully, but these errors were encountered:
BenLubar
added a commit
to BenLubar/cmv2mp4
that referenced
this issue
Mar 4, 2018
Great point. Probably makes sense to name the database after the cache (assuming IDB doesn't get upset with the default cache name which includes the sw scope)
So our mocks for IDB block the user of anything outside of this regex:
// Is the supplied identified a valid identifier?constr_identifier=/^[a-z_][a-zA-Z0-9_\-\$]*$/;functionvalidIdentifier(identifier){if(typeofidentifier==='string'&&identifier.match(r_identifier))returntrue;elsereturnfalse;}
I'm not sure if this 100% valid since I tried the idb name:
Going with scope.replace(/\W/g, '-') and using that as part of the IDB name seems like a reasonable enough capitulation to the demands of our IDB mock.
Library Affected:
workbox-precaching
Browser & Platform:
all browsers
Issue or Feature Request Description:
I have multiple web apps hosted on the same domain that each have a service worker set up to allow the use of the app offline. For example, https://benlubar.github.io/cmv2mp4/ and https://benlubar.github.io/df-ai/plan-editor/.
Setting a different cache name prefix on each only affects the name of the cache, which already contains the URL of the directory where the service worker is hosted. The IndexedDB is always named
workbox-precaching
and contains no information about which subdirectory the service worker is hosted in.The text was updated successfully, but these errors were encountered: