Home › Forums › JavaScript › IE + popstate… hmmm › Reply To: IE + popstate… hmmm
February 28, 2014 at 2:02 pm
#164392
Participant
You could try the ‘hashchange’ event which is fired with the hash part of the URL changes, as opposed to ‘pop state’ which is fired when a new entry in the history is added (such as when clicking an anchor element.)
http://caniuse.com/#feat=hashchange
You could also rip the history API detection from Modernizr or roll your own to detect whether pop state is available.
if (window.history && window.history.pushState) {
// bind pushstate stuff
} else {
// bind hash change stuff
}
I’m not sure if this actually would solve your issue but it’s a starting point.
Cheers