search

Home  >  Q&A  >  body text

javascript - How is the compatibility of sessionstorage and localstorage on mobile terminals?

Like the title,
The following are the search results for can i use
,
I would like someone with practical experience to answer the question, can it be used in a production environment?
The current search results are roughly as follows,
1, in the incognito mode of each browser, storage has no value,
2, ios5/6 may be cleared under certain circumstances.
Above Is this true in actual circumstances? Are there any other possibilities?

巴扎黑巴扎黑2731 days ago1016

reply all(4)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-06-05 11:15:42

    Our company’s products use a lot of localstorage/sessionstorage. There is no big problem with the compatibility of this product, whether on PC (if you want to consider compatibility with IE6/7, I didn’t say that) or on mobile.
    However, there are a few things you need to pay attention to when using it:

    • When using this product, remember to try catch to ensure that no exceptions will occur

    • The browser will report an error when setItem is in private mode

    It is best to pack it yourself, so it is more convenient to use.

    reply
    0
  • ringa_lee

    ringa_lee2017-06-05 11:15:42

    The mobile compatibility is very good. If it is a Webapp, you need to enable permissions on the app side first.
    ios 5 / 6, now ios 9 / 10 /11 Please wake up, Kobe Bryant has retired.

    reply
    0
  • 習慣沉默

    習慣沉默2017-06-05 11:15:42

    No problem. I have used sessionstorage for several projects and there is no problem at all

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-05 11:15:42

    http://caniuse.com/#search=lo...

    reply
    0
  • Cancelreply