Data storage with javascript on clients computer?

给你一囗甜甜゛ 提交于 2019-12-11 07:08:44

问题


Anybody knows ways to store data with javascript clients computer? Except using cookies.
May be there is such lib ?
By the way the data I want to be stored isn't secret if that matters.


回答1:


You could use HTML 5 Local Storage. It's what the Stack Exchange network uses for global authentication. It's supported only by modern browsers but you could always gracefully fallback to cookies if not supported (IE8+, Chrome, Safari, FireFox 3.6+, and Opera 10.61+ are all supported).




回答2:


You can use the "normal" js cookie method: http://de.selfhtml.org/javascript/objekte/document.htm#cookie or if you want to use a lib jquery with cookie plugin: http://www.electrictoolbox.com/jquery-cookies/




回答3:


If you are talking about database type storage there is google gears and adobe air. These are basically browser plugins that allow you to store data locally on the client. Google have deprecated google gears in favour of the new HTML 5 local storage.



来源:https://stackoverflow.com/questions/3742811/data-storage-with-javascript-on-clients-computer

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