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?
Asked
Active
Viewed 225 times
2
-
any specific error you're getting? – ADyson Jul 25 '17 at 11:14
-
if you would put in some code and the error that you are getting, it would have been helpful! – Prashanth Benny Jul 25 '17 at 11:17
2 Answers
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