This demo is meant for debugging Safari partitioning sessionStorage access between a page opened as top-level,
first-party context and iframe context. See
Webkit Bugzilla
.
Open this page first as top-level window and interact with it to set top level storages. This is to set the
experiment up and because the page being interacted with as first-party and setting first-party cookies
is required by Safari's Storage Access Api implementation
.
Optionally:
Register a service worker to test the cache storage of service worker which should be shared between
top-level and iframe.
Install the page to home-screen to test whether that gives us elevated storage access.
Then click "Open wrapper" to open another page which embeds this page as iframe.
Request storage access in the iframe. Clicking the button also provides the Storage Access Api with the user
interaction it's expecting.
Try to read the storage we set up previously as top-level window. They are unfortunately not readable.
Other ways considered for sharing data between the top-level context and iframe:
Try whether a shared worker can access common storage. However, as this already failed for the service worker,
it will likely for the shared worker, too.