Reputation:
I'm currently on a project where I need the page to refresh as soon as the music ends. With chrome and fire fox this code worked perfectly.
setTimeout(location.reload.bind(location), 206000);
However this does not work in edge.
Is there another way of going around it by using javascript not meta tags as this code snippet is in an if else statement.
Upvotes: 0
Views: 847
Reputation: 10520
As @T.J.Crowder said in comments, bind
method won't work with location.reload
on edge, in order to get cross browsing functionality you need to avoid using it.
Try to using this one instead:
setTimeout(function(){ location.reload(); }, 206000);
Upvotes: 2