I want to reload my page after all my code is loaded without using a button.
I used: location.reload();
The problem is that it repeatedly reloads my page all time.
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.
You need to store some sort of state outside of the page’s JavaScript that will indicate whether or not to refresh. One way is to use
localStorage, or a cookie, but neither of these will work per-tab or per-window.