0

In the link below, I made ​​an history.pushState example.

But if you click on the links and then try to go back or forward, you will see that don't works. You know tell me why? There are good practices? Can you help me?

http://jsfiddle.net/BQPgh/

Corbin
  • 33,060
  • 6
  • 68
  • 78
Caio Tarifa
  • 5,973
  • 11
  • 46
  • 73
  • It appears that JSFiddle may be the culprit here. Have you checked your code on another test server? – Steve Binder May 21 '12 at 20:04
  • Can you specify what you want to do. i.e. go back to another page or go back to the previous link. – PitaJ May 21 '12 at 20:22

3 Answers3

0

Not a solution for your specific question but I think it's worth mentioning: There's a very popular jQuery / Prototype / Mootools plugin that wraps the HTML5 history APIs nicely: https://github.com/browserstate/History.js/

balupton
  • 47,113
  • 32
  • 131
  • 182
0

Also do check out bbq plugin. http://benalman.com/projects/jquery-bbq-plugin/

vish.Net
  • 962
  • 2
  • 10
  • 21
-2

It's because the back and forward don't work with ajax.

You might try storing the previous page loaded somewhere and then have the back and forward links load your own history handler.

PitaJ
  • 12,969
  • 6
  • 36
  • 55