I want to refresh a web page and retain the value of the variable (created in javascript) when the page is reloaded.
for eg:
var cnt = 5;
cnt++;
I want the value of ‘cnt’ to be 6 even after I refresh a page. How can I do it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t see how you can do this, except by using cookies or session.