Relative Content

Tag Archive for javascripthtmllocal-storage

Why doesn’t window.localStorage conserve my saved objects when a new HTML page is loaded?

Based on what I have read and understood so far from MDN JavaScript documentation, in particular, the Storage: setItem() method section, it seems that it is possible to transfer objects between two HTML pages, for example, by clicking on a link in the first page redirecting the user to the other page, provided that before saving the object we wish to transfer from the first page to the second, that object is converted to a string via JSON.stringify (I mean, if it is not already a string).