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

chore: change localStorage to indexedDB #166

Merged
merged 2 commits into from Feb 14, 2023
Merged

chore: change localStorage to indexedDB #166

merged 2 commits into from Feb 14, 2023

Conversation

jvelezpo
Copy link
Contributor

@jvelezpo jvelezpo commented Feb 9, 2023

Pre-PR Checklist

  • I have run npm test locally and there are no warnings or errors, from lint or test
  • I have added screenshots if applicable

Summary

Changes localStorage for IndexedDB for storing heartbeats while users are offline
Why?
Web storage is limited, and has a synchronous API, so it should be avoided whenever possible https://web.dev/learn/pwa/assets-and-data/

IndexedDB API
IndexedDB is a low-level API for client-side storage of significant amounts of structured data, including files/blobs. This API uses indexes to enable high-performance searches of this data. While Web Storage is useful for storing smaller amounts of data, it is less useful for storing larger amounts of structured data

@jvelezpo jvelezpo merged commit 0a23269 into master Feb 14, 2023
@jvelezpo jvelezpo deleted the sebas-indexed-db branch February 14, 2023 00:29
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

2 participants