After travelling back in Firefox history, javascript won't run.
Posted
by Patonza
on Stack Overflow
See other posts from Stack Overflow
or by Patonza
Published on 2010-04-14T14:42:49Z
Indexed on
2010/04/14
14:53 UTC
Read the original article
Hit count: 287
When I use the back button on Firefox to reach a previously visited page, scripts on that page won't run again.
Is there any fix/workaround to have the scripts execute again when viewing the page the second time?
Please note that I have tested the same pages on Google Chrome and Internet Explorer and they work as intended.
Here are the files and the steps I used to test the problem:
(navigate to 0.html, click to get to 1.html, back button)
0.html
<html><body>
<script type="text/javascript">
window.onload = function() { alert('window.onload alert'); };
alert('inline alert');
</script>
<a href="1.html">Click Me!</a>
</body></html>
1.html
<html><body>
<p>Go BACK!</p>
</body></html>
© Stack Overflow or respective owner