Closed alonprince closed 8 years ago
What result do you expect in IE8?
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
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.
I just searched the documents of Hashbang.Thank you for giving me a good lesson.
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
.