history.js icon indicating copy to clipboard operation
history.js copied to clipboard

#./ vs #/ in HTML4 , demo vs implementation

Open divisi0nby0 opened this issue 13 years ago • 7 comments

I've just downloaded History.js, planning on using it in a new application, but have noticed something odd about the demo which I'm hoping someone can clear up.

First of all, I modified the index.html demo so the states being pushed were all /state1, /state2 etc. i.e. nice clean paths

This all worked great when I tried it in FF, Chrome and IE7/8/9 from:

http://mysite.com/js/balupton-history.js-e84ad00/history.js/demo/

HTML5 URLs look like

http://mysite.com/js/balupton-history.js-e84ad00/history.js/demo/state1

and HTML4 ones like

http://mysite.com/js/balupton-history.js-e84ad00/history.js/demo/#/state1

But when I copied the demo to the root of my site, and changed the paths to the JS files to be:

/js/json2.js /js/jquery.js /js/jquery.history.js

I noticed that in HTML4 browsers (IE7/8/9) the URLs come out like

http://mysite.com/js/balupton-history.js-e84ad00/history.js/demo/#./state1

Does anyone know why the dot is being added after the hash? Apart from the location of the demo file, and the paths to the JS files everything is identical.

divisi0nby0 avatar Jul 06 '12 12:07 divisi0nby0

Did you find a reason? having same problem

jaideep87 avatar Jul 24 '12 09:07 jaideep87

I am also having this issue. Did you find what was causing this to happen?

maddhacker24 avatar Sep 10 '12 18:09 maddhacker24

You can modify Line 515 in history.js. It seems like a typo, but only time will tell.

ken47 avatar Sep 25 '12 03:09 ken47

Still have that same issue. This project lacks tests hehe.

AlexGalays avatar Jun 01 '13 17:06 AlexGalays

Does anyone have any insight into this? I have the same issue

lnpbk avatar Jul 31 '13 14:07 lnpbk

This project is imo, more stable and better all around: https://github.com/devote/HTML5-History-API

AlexGalays avatar Aug 01 '13 11:08 AlexGalays

Modifying line 515 in history.js works for me.

Bitneko avatar Aug 12 '15 10:08 Bitneko