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

23,380

Solution 1

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

Solution 2

Chrome will support localStorage and sessionStorage in private window.

Share:
23,380
Justin Cloud
Author by

Justin Cloud

Full Stack Software Developer Forgive me for silly questions at midnight after a full day of coding :-)

Updated on July 09, 2022

Comments

  • Justin Cloud
    Justin Cloud almost 2 years

    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?

  • SuperUberDuper
    SuperUberDuper over 8 years
    what about cookies? would that allow saving just across page refreshes?
  • Vishal Kumar Sahu
    Vishal Kumar Sahu over 6 years
    @SuperUberDuper the discussion is beyond Cookies.
  • Accountant م
    Accountant م almost 5 years
    @SuperUberDuper I tested this in FF and cookies work(kept) in private mood across tabs
  • Paolo
    Paolo over 3 years
    but when? could you provide an official link where a such thing is stated? so far not yet supported (jan 2021)