I am opening files without HTTP protocol in Firefox versions 14-16.
I am unable open the indexdb. My syntax is this:
window.indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB;
var IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
var request = window.indexedDB.open(dbname, dbversion);
request.onsuccess = function (evt) {
alert('Success')
};
With Firebug I am able to see window.mozIndexedDB is null.
In localhost it is working fine, But I need to run without HTTP.
Are any changes are needed to my code?
A lot of stuff is disabled on the file protocol for “security” seasons. I tried to find the reason on the Mozilla site, but they do not mention it on MDN anywhere about the restriction. BUT if you go to the dark side, Microsoft mentions the restriction.
From Microsoft’s site: