Shared object

A common problem with developing apps using HTML is the difficulty of sharing data between web pages. Web browsers are designed to prevent data from leaking between websites by isolating tabs and consecutive pages. A common workaround involves storing values in window.localStorage, which is not an ideal solution. solves this problem by providing window.sharedObject, which is a global object available to every page in an app, including pages inside iframes. Values assigned as properties of sharedObject become visible everywhere. Any kind of Javascript value can be assigned, including objects and arrays. window.sharedObject.property_name = any kind of value.

sharedObject will be null in pages loaded from the Internet.

Pages inside iframes with a 'sandbox' attribute have a separate sharedObject.

WARNING: Some objects, such as HTML elements and documents, are deeply bound within the contex of their window. Manipulating them from a different window may cause instability, memory leaks, and crashes.