Here is a bit of code that has worked wonderfully for me on all browsers except IE9 and below.
(Doing the pushState twice each time is overkill, but I like it anyway.)
You just need to modify the code that says "myCritera, myStuff" and the like.
$(document).ready(function() {
if (myCriteria == 'yes') {
window.addEventListener('popstate', function(event) {
if (event.state) {
if (window.history.state == null){
return;
}
$('#myStuff').hide();
$('#myStuff2').hide();
$('#otherStuff').show();
window.history.pushState({},'', '');
window.history.pushState({},'', '');
}
}, false);
window.history.pushState({},'', '');
window.history.pushState({},'', '');
}
});