javascript - Changing URL in internet explorer 8 -



javascript - Changing URL in internet explorer 8 -

i need alter url in ie8 without reloading page. there method window.history.pushstate, method not work in ie8 works in other version.

is there method alter url in ie8 without reloading page.

according caniuse.com, ie8 supports using hashchange event. event allows to trigger function when part after hash in url changed, running when url changed. alter in hash of url not refresh page.

window.onhashchange = function() { if(location.hash == "#foo") { alert('bar'); } }

more info on hashchange event can found @ mdn.

javascript internet-explorer-8

Comments

Popular posts from this blog

ruby on rails - Devise Logout Error in RoR -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

model view controller - MVC Rails Planning -