3 ms·
I too wish they provided an ephemeral localStorage in private browsing. But in any case, your application should be interacting with localStorage through an in
by TheAceOfHearts 8y ago
I too wish they provided an ephemeral localStorage in private browsing.
But in any case, your application should be interacting with localStorage through an in-memory facade, otherwise it's still going to break with lots of other edge-cases. All operations should be treated as volatile, and probably silently suppressed on failures.
Using a facade also makes testing easier, and if you avoid global side-effects it becomes easier to parallelize test-cases.