devote / HTML5-History-API

HTML5 History API expansion for browsers not supporting pushState, replaceState
http://spb-piksel.ru
MIT License
1.02k stars 182 forks source link

I want go "/test" link but "/#/test" in fact #93

Closed alonprince closed 8 years ago

alonprince commented 8 years ago

When I use history.pushState({foo: 'bar'}, 'test', '/test') to replace href to /test, but it doesn't work well in IE8.It go to the /#/test.

devote commented 8 years ago

What result do you expect in IE8?

alonprince commented 8 years ago

For example, my window.location.href is www.google.com/ now, when i use history.pushState({foo: 'bar'}, 'test', '/test').I expect that I will get www.google.com/test,but I get www.google.com/#/test

devote commented 8 years ago

In IE 8-9 is the norm, because there is no other way to replace the URL in those browsers. Since they do not support natively History-API. Read about Hashbang.

alonprince commented 8 years ago

I just searched the documents of Hashbang.Thank you for giving me a good lesson.