This behavior seems to only occur in the latest version of Safari (4.0.4). Using the example below, the page will create an alert box after 60 minutes. If you open the following page, click the link to Google, and hit your browser's back button, nothing will happen. That works as expected.
However, if I open the following page in Safari, click through the link, then hit the back button, the alert box will immediately appear. This seems to only happen on the first try and will not occur again until I do a hard refresh or completely close Safari.
Is this expected?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<script type="text/javascript">
window.onload = function() {
setTimeout(function() {
alert('hit');
}, 60 * 60 * 1000);
}
</script>
</head>
<body>
<a href="http://www.google.com">Click me, then press the browser's back button.</a>
</body>
</html>