Uncaught SecurityError: Failed to execute 'replaceState' on 'History': cannot be created in a document with origin 'null' Uncaught SecurityError: Failed to execute 'replaceState' on 'History': cannot be created in a document with origin 'null' google-chrome google-chrome

Uncaught SecurityError: Failed to execute 'replaceState' on 'History': cannot be created in a document with origin 'null'


Add this:

<script>    $(document).bind('mobileinit',function(){        $.mobile.changePage.defaults.changeHash = false;        $.mobile.hashListeningEnabled = false;        $.mobile.pushStateEnabled = false;    });</script> 

Just before jquery.mobile-1.4.5.min.js

That works with Android WebViewClient and Chrome on Windows.


The Solution for me was that i have to run a webserver. It's a new chrome security feature and wont be changed according Chromium Bug Post.

Thanks to A. Wolff!


This can also be caused by Turbolinks (HTML pushState) when working with a local HTML file.