How Does localStorage in HTML5 work?

泄露秘密 提交于 2019-12-22 08:05:15

问题


How Does localStorage in HTML5 work? I searched every where (even in SO ) to find the actual internal logic of localStorage, but I ended up with visiting some examples which uses localStorage. I haven't found any useful Answer to my question. Can Someone post me a link or explain about the working of localStorage


回答1:


I'm not necessarily sure what you're looking for here...but the internal implementation of localStorage is going to be browser specific. I wouldn't count on any two browsers implementing the feature the same way internally (just like everything, the implementation and performance will give each browser a different advantage).

If you're really interested, I'd suggest pulling down the Chromium source and seeing how they implement things internally.




回答2:


You can use a simple jQuery plugin for store information using localStorage or cookie. This plugin it's useful because you don't need control if the browser has or hasn't suport to localStorage.

https://github.com/thyagoquintas/jquery-storage



来源:https://stackoverflow.com/questions/3628265/how-does-localstorage-in-html5-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!