2

I am not able to save any data in HTML local / session storage when safari is in private mode in IOS in iphone 6 plus. Can anyone help me with why this could be happening. Is it possible to over ride it and make it store data?

2 Answers2

2

possible duplicate : html5 localStorage error with Safari: "QUOTA_EXCEEDED_ERR: DOM Exception 22: An attempt was made to add something to storage that exceeded the quota.".

You can write a script and on exception ask user to open your website in normal mode or in a different browser

try {
        localStorage.setItem("check", "test");
        console.log("works!!");
    } catch (exception) {
        console.log('browser / mode not supported');
    }
Rishik Rohan
  • 512
  • 4
  • 16
1

Well, the reason is itself the browser, actually, Safari exposes the localStorage object, but it refuses to store any value.

You can store data in cookies instead.

Kamaal
  • 61
  • 5