Skip to content Skip to sidebar Skip to footer

Localstorage And Dom: Content Is Invisible Until I Visit The Page With The Setters

This is the website, if you scroll down at the bottom you will notice everything is invisible: This probably has to do with DOM conflict with LocalStorage. When you visit the page

Solution 1:

You have not set the items in storage in your index page but in the other pages. In the index page, you have just used custom.js that seems to be getting items rather than setting. So flow you are doing is, getting the item from the storage from index page(which does not exist) and then only setting item to the storage from other page(and of course, the user can sees the second time he goes to the index page because of this). You need to set the item first.


Post a Comment for "Localstorage And Dom: Content Is Invisible Until I Visit The Page With The Setters"