Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop using localStorage for recording database names #399

Merged
merged 2 commits into from
Dec 16, 2016

Conversation

dfahlander
Copy link
Collaborator

@dfahlander dfahlander commented Dec 16, 2016

Dexie.getDatabaseNames() polyfills indexedDB.getDatabaseNames() for on non-chromium browsers. To do this, it adds the name of every opened table into a localStorage property. Silly not to use an indexedDB database? Reason may have been because I was allergic to storing meta-data in indexedDB. But it's actually even more ridiculous to store it in localStorage so I've moved it to use indexedDB (database '__dbnames') for recording database names so that the feature works in workers as well.

The code size went actually smaller with this change, so I think it's in the right path.

This change will automatically migrate existing localStorage data into the new __dbnames table.

Now backing Dexie.getDatabaseNames() in indexedDB instead.
@dfahlander dfahlander merged commit 8c4d33b into master Dec 16, 2016
@dfahlander dfahlander deleted the temp/getDatabaseNames branch December 16, 2016 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant