Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid state Error in Firefox for Indexed Db

I am getting an error when opening an indexedDB database on Firefox. This code works fine in Chrome, but fails in Firefox.

<script type="text/javascript">
  var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB;
  var request = indexedDB.open("TestDB", 1);  
</script>

The Javascript error occurs on the line indexedDB.open("TestDB", 1).

like image 618
JIJIL Avatar asked Dec 29 '12 15:12

JIJIL


1 Answers

In my case, this error was due to privacy settings in Firefox. Setting history settings to "Firefox will: Remember history" in the preferences panel enabled IndexedDB to work.

like image 180
user2398029 Avatar answered Oct 14 '22 17:10

user2398029