5 ms·
This article is only about localStorage as a cache for performance optimization, and fails to signal this clearly enough. If, instead, you want to use it to st
by dgreensp 15y ago
This article is only about localStorage as a cache for performance optimization, and fails to signal this clearly enough. If, instead, you want to use it to store things locally (for example, persist a blob of data across page reloads), I assume it could be a fine solution.
There also seems to be something not quite pinned down about the argument that localStorage hits the disk on every access, and is therefore slow, especially since another argument is that if you "never visit a web site again, the data is still loaded when you start the browser." I'm a performance-conscious web developer, but is it really on me to carefully keep the browser from hitting disk? It's possible but it sounds suspect.
- jforman 15y agoI was skeptical about the same argument. Both indexing and virus scanning are non-blocking processes that shouldn't impact page load time. And I'm not sure what he means when he says "for an end user on the web they could mean a few seconds of waiting during which the web site stalls"? Filesystem caching isn't something specific to developers' boxes...
- krakensden 15y agoOn Windows, lots of virus scanners hook into the vfs and (at least a few years ago) sometimes do terrifying things like check every access. This can really, really slow down i/o.
- romaniv 15y agoThat doesn't sounds like a good enough reason to redesign a web API, especially if it means making it several orders of magnitude more complex. Stuff like that is clearly a problem, but it's not a browser problem.