How to make a div to be displayed even after refreshing the web page or reopening the browser

Viewed 27

Actually I am making a web page using HTML,CSS and Javascript in which there is only one html page with functions like when a person clicks on a particular button, that the current div will not be displayed but the another div will be displayed. At last there will be a home div which will act like the home page of the website. I want to make that home page to be displayed once a person fills all the credentials and always only the home page should be displayed even after reloading that web page or reopening the web page. I have researched everywhere but couldn't find the exact solution of the code. Thanks

2 Answers

Try with LocalStorege, hold information, and check if the condition is true, if it is just immediately execute the logic. This should solve the problem for you.

Related