# byondStorage (browser control)

Source: https://ref.dm-lang.org/skin/control/browser/byondStorage

A replacement for `localStorage` that can be used to hold information for reuse in later sessions of the same game. (This must be enabled via `browser-options` with the [`winset()` proc](https://ref.dm-lang.org/proc/winset.md).)

There are three actual storage objects you can use:

| hubStorage  |Stores info that can be shared for all games falling under this same [hub entry](https://ref.dm-lang.org/world/var/hub.md). (This will not be available without a hub path.)|
|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
|serverStorage|                       Stores info that can be shared for all games with the same hub path using this same server address.                        |
|domainStorage|                                             Same as serverStorage, but ignores the connection port.                                              |

Interacting with these storage objects is done in JavaScript, the same way you would use `localStorage` or `sessionStorage`.

> [!note]
> 
> Technically `localStorage` does work, but because of the way BYOND handles browser controls it acts more like `sessionStorage` in practice.

### See also
- [browser control (skin)](https://ref.dm-lang.org/skin/control/browser/index.md)
- [winset proc](https://ref.dm-lang.org/proc/winset.md)
