Created
June 9, 2014 14:49
-
-
Save jikeytang/05b416d2a48d8cefc5ea to your computer and use it in GitHub Desktop.
[ Html ] - 20140610-题目1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
请阐述以下session, cookies, userdata,sessionStorage 和 localStorage 的区别? | |
PS: | |
1. 回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```html | |
// you code | |
``` | |
2. 也可以粘贴jsfiddle地址,比如: | |
http://jsfiddle.net/jikeytang/Rmt8M/ | |
评论支持markdown语法。 | |
[http://jsfiddle.net/jikeytang/Rmt8M/](http://jsfiddle.net/jikeytang/Rmt8M/) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
userdata:低版本IE下的本地存储实现,将数据以xml文件的形式存储在用户电脑的userData目录下,存储容量约单文件128KB,单域1024KB
sessionStorage:HTML5中的新功能,用于在本地存储一个会话(session)中的数据,这些数据只有在同一个会话中的页面才能访问并且当会话结束后数据也随之销毁。
localStorage:HTML5中的新功能,实现本地存储数据,除非手动删除,否则存储时长为永久,存储容量为5MB
userdata和localStorage结合,可以实现兼容的本地(离线)存储方案。详见:https://github.com/luics/storage/wiki/Storage#%E5%AD%98%E5%82%A8%E4%B8%8A%E9%99%90