I am working on an ember application (using ember-1.0.pre.js). And I'm trying to provide cross browser compatibility on IE8.
The issue is with url generate after every transition, it seems incorrect/falsy to user. Let say I hit the url like the_ domain_name/sell/new
which initially land me to on sell page of our application. and then i tries to transit a new state called "Purchase" which will land me on purchase page of our application.
The new state transition generates a URL the_ domain_name/sell/new#/offers/purchase?&suid=1365149991779013736531657156165
in IE8 addressbar instead of the domain_name/offers/purchase
.
Note: the_domain_name = http://www.example.com
The generated url includes two incorrect things,
The initial prefix "/sell/new#".
The parameter "?&_suid=1365149991779013736531657156165" in query string of url.
I tried to figure out the issue and found that HTML4 browsers does not supports pushState and replaceState methods from History API from HTML5. How can i provide the support on IE8 Can anyone help me on this?
I suggest
History.js
as polyfill for browsers not support History API: https://github.com/browserstate/history.jsIt is working in:
HTML5 Browsers:
HTML4 Browsers:
Add jquery.history.js & Register a
history.js
location handler into you Ember App.Here are the parts I modified from original
Ember.HistoryLocation
( Full code )Then use this polyfill in your App: