history.pushState disappears in IE 11

五迷三道 提交于 2019-12-07 15:02:12

问题


There is a site http://www.pionart.pl which is a good illustration of the problem I have with the current site I develop with almost the same code/CMS

When I enter the site with IE 11, the browser forgets half of the history methods, incl. history.pushState() (you can easily check it by invoking the console with F12 and typing history.)

When I enter http://stackoverflow.com in the same tab, IE suddenly remembers all the methods back.

The question: what is the purpose of the "forgetting"? How to prevent it?

Adam


回答1:


The problem was

<meta http-equiv="X-UA-Compatible" content="IE=9">

It forced IE 11 back to IE9 state, and we have pushState from IE10 up...

A.



来源:https://stackoverflow.com/questions/22276143/history-pushstate-disappears-in-ie-11

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!