I\'m using the new HTML5 onpopstate event. Using Firefox 4 the window.onpopstate event is triggered on a page load whilst in Webkit this does not seem to be the case.
<
Just solved this issue, and the fix is actually quite simple. Firefox doesn't fire onpopstate on initial page load. After you fire a popstate, return false or prevent default on the page.load action, and you're golden.
Cheers.
In action here: www.thecoffeeshopnyc.com
// Write in a new handler for Firefox, which does not fire popstate on load.
// Modern Webkit browsers fire popstate on load. The event handler below fires the controller
$(window).load(function () {
if ($.browser.mozilla) {
// Your func.
}
})
// Add the event listener. If the above is false, it will still run as intended in normal browsers.
window.onpopstate = function() {
// Your func.
}