I use local storage for the site search page for my personal website to cache the search index. My site is a static website hosted on GitHub Pages. So without a backend, and without using some 3rd party service, search is run entirely in browser. Obviously can't feasibly do this for a very large site. But index for my site is just under 800 KB.
When using local storage for caching, you do need some mechanism to know when to use cached version and when to make a fresh request.
I use local storage for the site search page for my personal website to cache the search index. My site is a static website hosted on GitHub Pages. So without a backend, and without using some 3rd party service, search is run entirely in browser. Obviously can't feasibly do this for a very large site. But index for my site is just under 800 KB.
When using local storage for caching, you do need some mechanism to know when to use cached version and when to make a fresh request.
RepoLink, please 😃
The GitHub repo is: github.com/cicirello/cicirello.git...
The site itself is at: cicirello.org/