Skip to content

Storage Segmentation

W. "Mac" McMeans edited this page Feb 12, 2022 · 5 revisions

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.

localStorage Keys

The usual suspects:

set / get      clear      key      remove

The esoteric ones:

Array Keys:
push / pull, pullall      poke      contains      where

Broadcasting:
broadcast

Bypass:
forceset / forceget

Data Transfer:
import / export

Duplicates:
countdupes, showdupes, listdupes

Internals:
cancrunch      crunch / uncrunch

shufflestring / unshufflestring

xorstring

Management:
keys

Memory Consumption:

Memory Quota:
showquota

Query:
haskey, hasval, hastype

Security:
safeset / safeget

setscramblekey / getscramblekey

Type Check:
isarray      isbigint      isboolean      iscrunch

isdate      isfloat      isinteger      isnull

isnumber      isobject      isstring

showtype

Utility:
chopget      copy      softset      rename

Properties:

channel      length      quota      version

Settings:

verbosity

Memory Keys

Standard:

_set / _get      _clear      _key      _remove

Unconventional:

Data Sync:
_backup / _restore

Management:
_keys

Security:
_safeset / _safeget

Type Check:
_isarray      _isbigint      _isboolean      _iscrunch

_isdate      _isfloat      _isinteger      _isnull

_isnumber      _isobject      _isstring

_showtype

Utility:
_chopget      _copy      _softset      _rename

Clone this wiki locally