1

I get this error in my page.

SecurityError: The operation is insecure

At first, I thought that it was just a matter of Same Origin Policy problem. To test this, I have commented out all the code that deals with History.js

But I still get that error in that page.

It seems that I get this error by simply including jquery.history.js in a page.

Any ideas why this is the case?

developarvin
  • 4,940
  • 12
  • 54
  • 100
  • 1
    See this issue for explanations: http://stackoverflow.com/questions/13348766/securityerror-the-operation-is-insecure-window-history-pushstate – Andreas Bernhard Jan 30 '13 at 10:48

2 Answers2

1

I had the same problem - apparently I was missing 'www.' from the url I was pushing. It really needs to be exact match - otherwise it won't work. If you want to use both www.example.com and example.com you need to write little helper method for that.

Pavel
  • 5,213
  • 10
  • 34
  • 47
0

This is likely due to pushing state with a URL that is of a different domain name. Check to see you are not using pushState or replaceState with a different domain.

Tony Brasunas
  • 4,012
  • 3
  • 39
  • 51