IE11 window.history.pushState "Object doesn't support property or method 'pushState'

前端 未结 1 1301
深忆病人
深忆病人 2021-01-18 04:25

I have this simple html code below. It works as expected (appending ?SomeParam to the url) in my development environment (Visual Studio 2010) in both Chrome and IE11. When

相关标签:
1条回答
  • 2021-01-18 05:03

    Try adding the following meta tag to your page, if you haven't done so already:

    <meta http-equiv="x-ua-compatible" content="IE=edge">
    

    Ensure also that this is the first meta tag on the page.

    Are you running this application on an intranet? If so, IE11 may decide to emulate an older version of IE (check this using F12 Developer Tools). The above meta tag should stop IE from doing this and force it to render the page in IE11 mode.

    0 讨论(0)
提交回复
热议问题