I am using browsers localStorage to store a value, but while using google chrome, when we refresh the page using window.location.reload(), lo
localStorage
window.location.reload()
lo
LocalStorage supports only string values, not boolean or others.
Method to store and retrieve values:
Put the value into storage
localStorage.setItem('value1', 'true');
Retrieve the value from storage
var val1 = localStorage.getItem('value1');
Read more on MDN..