代码之家  ›  专栏  ›  技术社区  ›  David Johnstone

Internet Explorer是否支持pushState和replaceState?

  •  138
  • David Johnstone  · 技术社区  · 14 年前

    有人知道Internet Explorer是否支持 history.pushState() history.replaceState() 方法 manipulating browser history ? 考虑到这些只是在Firefox4中实现的,我没有屏住呼吸,但是有人知道它们是否会出现在IE9中吗?

    4 回复  |  直到 14 年前
        1
  •  196
  •   dave1010    12 年前

    CanIUse history .

    IE9:没有 IE10:是的 (截至平台预览3)

    微软有一个好的 overview for developers IE9确实有很多特性。

    更新: history.pushState() history.replaceState() .

    更新2:当前平台预览 IE10 still does not support pushState / replaceState .

    更新3:IE10平台预览3 支持历史API! Details

        2
  •  17
  •   Hidden    10 年前

    IE9不支持。

    但是,您可以使用解决方法使用Polyfill来获得功能-历史.js https://github.com/browserstate/history.js .

    Modernizr在这里很好地列出了html5 https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills

    需要注意的是,在只支持HTML4功能的浏览器中,它会向URL添加一个查询字符串。

        4
  •  0
  •   f0rmat1k    7 年前

    推荐文章