In fact some browsers have changed their handling for it over time. So it's possible that browsers may change their file: URL handling for localStorage at any time. But there are no guarantees about that behavior, so you shouldn't rely on it because, as mentioned above, the requirements for file: URLs remains undefined. In other words, each file: URL seems to have its own unique local-storage area. In all current browsers, localStorage seems to return a different object for each file: URL. In particular, for a site loaded over HTTP (e.g., ), localStorage returns a different object than localStorage for the corresponding site loaded over HTTPS (e.g., ).įor documents loaded from file: URLs (that is, files opened in the browser directly from the user's local filesystem, rather than being served from a web server) the requirements for localStorage behavior are undefined and may vary among different browsers. LocalStorage data is specific to the protocol of the document. As with objects, integer keys are automatically converted to strings. The keys and the values stored with localStorage are always in the UTF-16 string format, which uses two bytes per character.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |