I am considering using localStorage to store recent searches.

Pros:
- Privacy friendly, backend doesn't track what you search
- Quicker to load results for previous searches

Cons:
- I can't think of any. If you can, please reply to this post! #pixeldev

Follow

@dansup If you use localStorage, it won't be accessible if a Service Worker comes in your app at some point (which is rather likely to happen). IndexedDb would by my first choice (with github.com/jakearchibald/idb-k for simple use cases). Also, this read is worth it: rdegges.com/2018/please-stop-u

Sign in to participate in the conversation
NintendojoFR

Ceci est l'instance du site NintendojoFR. Elle est réservée aux membres de la rédaction et à nos chers lecteurs qui souhaitent avoir un compte.