In Mac Safari 4.04 & Firefox 3.6, I am seeing page state being persisted on back button to page. I couldn't reproduce on jquery 1.3.2.
Here's a simple example:
<html>
<body>
<script type="text/javascript" src="jquery-1.4.js"></script>
<a href='#content1'>tab 1</a> <a href='#content2'>tab 2</a>
<div id='content1'>content 1</div>
<div id='content2'>content 2</div>
<script>
$('a').click(function(){
var href = this.href;
href = href.slice(href.indexOf('#'));
$(href).toggle();
return false;
});
</script>
</body>
</html>
1. Click on one of the anchors.
2. Goto another page
3. Click the browser back button
Result: One of the sections is still hidden.
Is anyone else seeing this? How is jquery doing this?