We have been observing this over the past few days with the replacement of State in a jQuery mobile device.
https://forums.developer.apple.com/thread/36650
Summary
A simple replication case that gives dom exception 18 in the Safari console:
for (var i=0 ; i<=100; i++) { window.history.replaceState(null, null, "http:/www.apple.com/"); }
Apple answer:
This issue behaves as intended based on the following: design. We fixed a security bug in iOS that abused PushState / replaceState.
Resolution
For us, the solution was simply to remove the violation string from the jQuery mobile platform:
window.history.replaceState( state, state.title || document.title, href );
I appreciate that this is probably not useful for your case, but at least it can help explain the behavior you see.