Does Internet Explorer support pushState and replaceState?

Internet ExplorerHtmlPushstate

Internet Explorer Problem Overview


Does anybody know if Internet Explorer supports the history.pushState() and history.replaceState() methods for manipulating browser history? Considering these are just being implemented in Firefox 4, I'm not holding my breath, but does anybody know if they're coming in IE9?

Internet Explorer Solutions


Solution 1 - Internet Explorer

Probably the best site for browser compatibility information is CanIUse. Here's the section on history.

Summary - IE9: no, IE10: yes (as of platform preview 3)

The first Release Candidate of IE9 (released 10th Feb 2011) does not support history.pushState or history.replaceState. Generally no new features are added after a product gets to RC stage so it is very unlikely that the final IE9 will support these methods.

Microsoft have a good overview for developers of the features IE9 does have.

Update: Internet Explorer 9 was launched (on 14th March 2011) and definitely does not support history.pushState() or history.replaceState().

Update 2: The current platform preview of IE10 still does not support pushState / replaceState.

Update 3: Platform Preview 3 of IE10 supports the history API! Details

Solution 2 - Internet Explorer

IE9 doesn't support it.

You can however use a work around using a Polyfill to get the functionality - History.js https://github.com/browserstate/history.js.

Modernizr do a good job listing HTML 5 Polyfills here https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills.

The caveat is that it will add a query string to your URL in browsers that only support HTML 4 features.

Solution 3 - Internet Explorer

Internet Explorer 10 introduces support for the History interface of the HTML5 draft specification, which includes methods that enable you to manage a site's history stack and URL.

The original link:https://msdn.microsoft.com/en-us/library/ie/hh920758(v=vs.85).aspx

Solution 4 - Internet Explorer

Btw you can get such error in reason of absolute path in pushState(). When i set relative path error was disappeared.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDavid JohnstoneView Question on Stackoverflow
Solution 1 - Internet Explorerdave1010View Answer on Stackoverflow
Solution 2 - Internet ExplorerSebastian PattenView Answer on Stackoverflow
Solution 3 - Internet ExplorerQC-cheetahView Answer on Stackoverflow
Solution 4 - Internet Explorerf0rmat1kView Answer on Stackoverflow