Persist variables between page loads
As HTTP is stateless, every time you load the page it will use the initial values of whatever you set in JavaScript. You can’t set a global variable in JS and simply make that value stay after loading the page again. There are a couple of ways you could store the value in another place … Read more