简体   繁体   中英

Does HTML5 Web Storage API still work offline?

By Web Storage I am referring to: http://www.w3.org/TR/webstorage/

Since Web Storage is client-side, will it still work without a current internet connection?
Provided all scripts etc. were already loaded, if the user then lost connection or set their browser to offline mode, would any web storage processing still work? (eg getting and setting keys in local/session storage)

Yes. To get and set local storage, session storage, or cookies, the computer must be connected… to itself. That doesn't require an internet connection.

So if the everything you need is downloaded (like in cache), you have everything you need. Everything is on the computer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM