其他分享
首页 > 其他分享> > cookie, seesion, storage, indexDB

cookie, seesion, storage, indexDB

作者:互联网

cookie, seesion, storage, indexDB

http do not have state

1.Cookie 4k, could set expires and max-time

usage: http header || document.cookie

maintain user page’s state
(Store user’s info in browser but too small, not secure)

2.Localstorage 5m, long time

usage: window
Store user’s info in browser, ex…username

Required same domain port protocol

3.Sessionstorage, short time

Store temporary info in browser

Required same window.

4.indexDB 250m

usage: window
Store huge info in browser, non-relational DB

reference

https://www.cnblogs.com/fundebug/p/about-browser-storage.html

标签:info,storage,window,cookie,seesion,usage,Store,browser
来源: https://blog.csdn.net/qq_37282444/article/details/116614474