I have a website example.com. example.com is embeded in an iframe on example2.com. I fill in some data in the iframe, this data is saved in localstorage on example.com.
Now if i navigate to examle.com, this data persists. Meaning it is sharing localstorage with the iframe, which makes sense because it is the same website, however, this only works in chrome, in firefox and safari, the data does not persist.
So to be clear, i dont want to share data between example.com and example2.com i just want the localstorage to persist on example.com regardless of it being in an iframe or being accessed directly.
Thanks
LocalStorage is intended to store data on client's browser and, because of this, stored data are equated to third-party cookies when saved by resources coming from external domains.
Currently (Jan 2022) browsers are dropping support (in terms of both availabilty and durability) of third-party cookies and you probably should expect Chrome will behave in the same way in the near future (see here).