| Page 1 of 1 | [ 2 posts ] |
|
What is the best way to re-enable events when a page is re-visited via the browser's Back button?
More specifically, I have a simple page consisting of something like following: <html> <body> some stuff... <script src="http://yui.yahooapis.com/3.0.0/build/yui/yui-min.js"></script> <script src="/JS_688897D4C4744EE0A13535002B109D06.js"></script> </body> </html> The YUI sandbox is declared in the JS_xxx file. That file has some in-line code that sets up event handlers for elements on the page. It all works fine--the first time the page is displayed. But when a Back-button click re-displays the page, the in-line JS code is not executed. I could hook to <body onload="">, but I'd like the page to render first (without waiting for the external files to be pulled down). What is the right way to make sure that my initialization code in JS_xxxx is reliably called after the page is rendered, even on a re-visit to the page? |
|
So I learned that setting cache-control=no-store instead of no-cache does cause scripts to be executed on reload of the page when the back button is clicked.
I'm still curious though about the best way to execute YUI code when the page is loaded: onload, inline javascript statements, or something else... |
| Page 1 of 1 | [ 2 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group