最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Browser: Uncaught SecurityError: Failed to execute 'replaceState' on 'History': A h

programmeradmin3浏览0评论

I just got this error on a on desktop only website which uses an IDE to render the page. It works on FireFox some, but the controls necessary to generate all of the JavaScript is not there as in Chrome. Perhaps I could add a cross patibility line but I do not know what. The reason why is this strange error I never have had before on the debugger... Please help with resolution.

Uncaught SecurityError: Failed to execute 'replaceState' on 'History': A history state object with URL 'file:///C:/Users/J/Desktop/Rain_Watch%20Webpage/default.html' cannot be created in a document with origin 'null'.
jquery.min.js:2 Uncaught Error: jHERE already initialized, expected method.

I just got this error on a on desktop only website which uses an IDE to render the page. It works on FireFox some, but the controls necessary to generate all of the JavaScript is not there as in Chrome. Perhaps I could add a cross patibility line but I do not know what. The reason why is this strange error I never have had before on the debugger... Please help with resolution.

Uncaught SecurityError: Failed to execute 'replaceState' on 'History': A history state object with URL 'file:///C:/Users/J/Desktop/Rain_Watch%20Webpage/default.html' cannot be created in a document with origin 'null'.
jquery.min.js:2 Uncaught Error: jHERE already initialized, expected method.
Share Improve this question edited Sep 16, 2015 at 13:21 Neha 6739 silver badges16 bronze badges asked Sep 5, 2015 at 1:40 safron6safron6 1491 gold badge2 silver badges13 bronze badges 2
  • I discovered part of the problem is the line of code by menting it out: <script src="http://code.jquery./jquery-1.8.2.min.js"></script> Is this an outdated script reference for javascript and jQuery mobile? – safron6 Commented Sep 5, 2015 at 2:06
  • 2 I tried this i might be helpful to you. [ Failed to execute 'replaceState' on 'History'](stackoverflow./questions/32481260/…) – Azmat Karim Khan Commented Oct 29, 2015 at 9:33
Add a ment  | 

2 Answers 2

Reset to default 1

just tried something similar and I got the same error with Chrome. when I run the code from a webserver works fine.

create a dir in webapps in tomact put web-inf from root in project dir create a startup file which start page of your project http://localhost:8080//index.jsp

I am also getting the same error while testing my project on Google Chrome. But it is working on Firefox, Opera and Safari on Mac.

If anyone is encountering the same issue, test your project on other broswers.

You can find this issue discussed on ChromeReleases Blog.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论