Storage Segmentation - macmcmeans/localDataStorage GitHub Wiki

The memory used for localStorage in the browser is unique, and is enforced per the protocol://host:port combination.

This means the origins https://PrismCipher.com and http://PrismCipher.com cannot share the same web storage, but https://PrismCipher.com/oldproject.html and https://PrismCipher.com/newproject.html will. In these cases, localDataStorage can help you keep things straight by prefixing keys.

For example, you could instantiate localDataStorage for the old project, and create another instance for the new project, both in the same origin using different key prefixes. Done once, it's easy to setup and requires no further maintenance.

No matter which key prefix you choose, it's only used when creating localDataStorage, not when setting/getting keys.