For all major browsers (except IE), the JavaScript onload
event doesn’t fire when the page loads as a result of a back button operation — it only fires when the
OK, here is a final solution based on ckramer's initial solution and palehorse's example that works in all of the browsers, including Opera. If you set history.navigationMode to 'compatible' then jQuery's ready function will fire on Back button operations in Opera as well as the other major browsers.
This page has more information.
Example:
history.navigationMode = 'compatible';
$(document).ready(function(){
alert('test');
});
I tested this in Opera 9.5, IE7, FF3 and Safari and it works in all of them.