How to refresh another page using javascript (without opening the same page in a new tab) both the pages are Under the same Domain and in 1 script
So i want to send data form the first page using localStorge method in js and when the localStorge have data in them (not equals to null) i want the second page to be refreshed so i can display the data in the second page
i tried this to refresh the second page each 4s
setTimeout(function(){
window.location.reload(1);
}, 4000);
it does work but i have to wait until the images are display and all and i am afraid the second i published the site it crashes of to many refreshes
Q1: is it bad to refresh the page so many times ?Does the website crashes? Q2:is there any way i can refresh the page 2 when the localStorge method is not null ?
Via Active questions tagged javascript - Stack Overflow https://ift.tt/YkwCSjm
Comments
Post a Comment