simpleStorage icon indicating copy to clipboard operation
simpleStorage copied to clipboard

Possible to store data outside the simpleStorage object?

Open bridgeport opened this issue 10 years ago • 3 comments

jStorage is great, and I think simpleStorage is great for a more minimal footprint. The concern I have with both scripts is the dependency that would result from using either. The key/value data is stored within the jStorage/simpleStorage object. This makes it difficult to transition from or to simpleStorage when visitors have pre-existing localStorage data already set in the browser.

Using localStorage directly, or other storage wrappers, the key/value data is stored at the root/top-level by default. I understand your rationale for doing it differently (such as supporting TTL), but would you consider modifying it so that the key/value data is stored at the root/top-level instead? Or perhaps mirror the data to break the dependency, or track TTL separately? Or whatever else would work to allow folks to seamlessly transition to using simpleStorage?

Thanks.

bridgeport avatar Feb 21 '14 04:02 bridgeport