Client-side data storing,DOM storage or HTML5 Local Storage?

前端 未结 2 1566
南方客
南方客 2020-12-22 10:27

Im really confused when thinking about my requirement to store data locally for offline viewing.Now i have two options,DOM storage and HTML5 Local storage. As im a complete

相关标签:
2条回答
  • 2020-12-22 10:46

    DOM Storage or Web Storage is the collective name given to the following types of client storage options available in HTML5. It includes:

    • localStorage
    • sessionStorage

    Local storage is persistent meaning the stored data will still be there when you close and re-open the browser window.

    Session storage is temporary and is available as long as the page session lasts.

    There is really no comparison between the two since technically they both are the same.

    0 讨论(0)
  • 2020-12-22 10:55

    Try to have a read here http://blog.sebarmeli.com/2010/11/22/understanding-webstorage/, you can easily understand the two objects, their methods, event attributes and their possible use.

    0 讨论(0)
提交回复
热议问题