I need to differentiate between page load and page refresh in jQuery. I have no idea how to implement the following code.
if( /* this page is loaded reffered */ )
++count ;
else if( /* this paged is refreshed */ )
alert("refreshed");
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.
Using a simple counter won’t work. I’ll try to illustrate it in semi-pseudo-code
Alternatively, instead of setting a cookie, you could use the HTML5 web storage API.
Taken from here