You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works on same-origin policy. So, data stored will only be available on the same origin.(受同源策略的影响 数据只能在同源网站内存储和使用)
1. The data is available only inside the window/tab in which it was set.(数据只在当前网页中有效)
2. The data is not persistent i.e. it will be lost once the window/tab is closed.(数据不能持续保存 关闭网页或浏览器后数据丢失)
3. Like localStorage, tt works on same-origin policy. So, data stored will only be available on the same origin(和localStorage类似 受同源策略影响 数据只在符合同源策略的网页中使用)
相同点
localStorage, sessionStorage and cookies are all subject to "same-origin" rules which means browsers should prevent access to the data except from the domain that set the information to start with.
❶: perfect for persisting non-sensitive data needed within client scripts between pages (for example: preferences, scores in games). The data stored in localStorage and sessionStorage can easily be read or changed from within the client/browser so should not be relied upon for storage of sensitive or security related data within applications.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: