未捕获的安全性错误:未能对“历史记录”执行“replaceState”:无法在源代码为“null”的文档中创建

我真的不明白这个chrome错误:

未捕获的安全性错误:未能对“历史记录”执行“replaceState”:无法在源代码为“null”的文档中创建

在Edge、Firefox和IE中没有错误

我使用jQuery1.11.1和jQueryMobile 1.4.5

这是我的索引文件:

<!DOCTYPE html>
<html>
<头>
<meta charset=“UTF-8”大于;
<meta name=“viewport”content=“width=设备宽度,初始比例=1”>
<link rel=“样式表”href=”https://stackoverflow.com/questions/32453806/css/xy.min.css“/>
<link rel=“样式表”href=”https://stackoverflow.com/questions/32453806/css/jquery.mobile.icons.min.css“/>
<link rel=“样式表”href=”https://stackoverflow.com/questions/32453806/css/jquery.mobile.structure-1.4.5.min.css“/>
<标题&gt&lt/标题>
&lt/头>
<车身>
<div data role=“page”>
<div data role=“header”数据添加回btn=“true”>
<p align=“center”>测试&lt/p>
&lt/部门>
<ul data role=“listview”data filter=“true”data filter placeholder=“Kategorie suchen”data inset=“true”data count theme=“b”>
<李&gt&书信电报;a href=”https://stackoverflow.com/questions/32453806/assets/beck/index.html“数据相关”对话框“rel=”外部“>Bäckereien&lt/a&gt&lt/李>
&lt/ul>
&lt/部门>
<脚本src=”https://stackoverflow.com/questions/32453806/js/jquery-1.11.1.min.js“&gt&lt/脚本>
<脚本src=”https://stackoverflow.com/questions/32453806/js/jquery.mobile-1.4.5.min.js“&gt&lt/脚本>
&lt/车身>
&lt/html>

非常感谢任何帮助

添加以下内容:

<脚本>
$(document).bind('mobileinit',function(){
$.mobile.changePage.defaults.changeHash=false;
$.mobile.hashListengEnabled=false;
$.mobile.pushStateEnabled=false;
});
&lt/脚本>

就在jquery.mobile-1.4.5.min.js之前

这与Windows上的Android WebViewClient和Chrome配合使用

发表评论