javascript – Losing localStorage data on iOS in iframe on mobile


we are integrating with a webpageA (domainA.com) and loading our webpageB (domainB.com) within an iframe. In webpageA we store some data in localStorage.

This localStorage data is retained when I access webpageA directly or webpageB while the application (Safari or Chrome) is active. Even if I open a new tab and access a fresh webpageB, the localStorage is retained.

However if I close down the application (swipe up), when I return to webpageB, the data is lost. This applies to both Safari and Chrome on iOS. It is not an issue on android, only iOS.

A point of note here is that we dont have full access over domainB.com, we do have full edit control over webpageB and the iframe, so if there is any smart way to implement this so that localStorage is not lost would be great.

Thanks in advance for any assistance.

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img