Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
553 views
in Technique[技术] by (71.8m points)

javascript - Web Storage (sessionStorage and localStorage) in private browsing mode (incognito)

BACKGROUND

The HTML5 Web Storage feature in modern browsers is accessed through Javascript commands such as:

sessionStorage.setItem("username", "John");
localStorage.setItem("username", "John")

The site Can I use indicates that browser support is near 90%. However, in the "Known Issues" tab, Can I use says:

In private browsing mode, Safari, iOS Safari and the Android browsers do not support setting localStorage.

MY QUESTION

In private browsing mode, do Safari, iOS Safari and the Android browsers still support sessionStorage?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Android and chrome I believe allow you to access old keys in session storage, but not write to it. I know that Safari will not allow any use of session or local storage.

similar so question


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...