Local Storage not working on iOS (Both Chrome and Safari )

My local storage is working fine on desktop browsers but not working on iOS Chrome and iOS Safari (And i’m not using private browsing) What do i do to make it work ?

How are you testing this and what exactly is not working?
What is your setup/use case?

EDIT: I just tested on safari on ios and it is working just fine. I can store data in the local storage and display it on the page.

<dmx-local-manager id="local1"></dmx-local-manager>
    <div class="container pt-5 pb-5">
        <div class="row">
            <div class="text-center col-12 ">
                <h4 class="mb-5">Data in local storage: {{local1.data.myitem}}<br></h4>
                <button class="btn btn-primary btn-lg" dmx-on:click="local1.set('myitem','Hello there')">Button</button>
            </div>
        </div>
    </div>

Session Storage was not sharing variables across tabs so i switched to local storage. Session storage was working fine on iOS but local storage is not.

My setup is like this :

On login page , i call my login API through API forrm . If it is successful i set local storage variable , isLoggedIn== true. On all my pages the logout button has a dynamic atrribute show only if logged in ==true. On Mobile , if I log in , at first everything works ok. The login is successful , i am redirected to homepage where logout button is now visible. But the moment i navigate to any other page , from a hyperlink on my homepage, the logout button is not visible

But do you have your session storage manager and dmxStateManagement.js included on every page?

I do , i think the problem is that it is working on local host but not on actual site(on neither desktop nor ios). I know the latest site is uploaded because i can see some formatting changes i made. I cleared history and cache too. Could be a problem with filezilla upload. Will try manual upload.

I am also testing on a local server and have no issues.

For me too it is working on local server but not on actual domain I’m deleting everything again on domain and retrying with manual upload instead of filezilla

Just for your info … Wappler has it’s own FTP manager, you don’t need filezilla.

1 Like

Thanks i did not know that, will switch to that. It’s still not working. Everything works fine on local host but not on actual site (neither desktop nor mobile) . I had changed to local storage from session storage by creating local storage of same name with same variables and deleting the session storage, to avoid rewriting the logic/flows on the whole site , could this cause a problem. But if it did, why would it work on local host

I linked it to a new a subdomain and it’s working now on ios as well as desktop. Will keep trying on earlier subdomain. A bit worrying that the purge and delete on my cdn seems to be a bit unreliable. So sorry for the trouble