0

Sometimes when on a webpage I click on a link it takes me somewhere but the history for back/forward buttons in the browser aren't updated.

I understand this with AJAX however on several this doesn't seem to be the case. For example on this page the first img is anchored and when I click it the page history is still not updated. This way I cannot go back...

I've checked the source with the built-in web developer tools but neither the img nor the a html element doesn't seem to feature any special attribute. I've read the inline css rules for it but didn't contain anything suspicious.

I disalbed Javascript and noticed that then clicking the image does update the history.

How is this achieved technically in Javascript, especially the 'disabling history update' part?

edit I use Firefox 22 on Windows 7 64bit. I've tried restart with addons disabled and it still doesn't update.

  • You might want to mention your OS and browser. On my system (Linux and firefox) clicking on the image in the link you provided updates my history normally. – terdon Nov 6 '13 at 15:09
  • I can replicate the issue on IE9, but not in any other browsers. – Marcks Thomas Nov 6 '13 at 15:16
0

Most likely uses pushState() when the page is loaded.

Manipulating the browser history

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.