MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See whistlepig.mozilla.org for all notifications.

mozilla

Revision 347027 of IDBFactory

  • Revision slug: IndexedDB/IDBFactory
  • Revision title: IDBFactory
  • Revision id: 347027
  • Created:
  • Creator: madarche
  • Is current revision? No
  • Comment Added warning: At the moment due to bugs or on purpose it's impossible to open an IndexedDB database from a local webpage (running from file:///) or from a Web App

Revision Content

The IDBFactory interface of the IndexedDB API lets applications asynchronously access the indexed databases. The object that implements the interface is  window.indexedDB. You open—that is, create and access—and delete a database with the object and not directly with IDBFactory.

The object indexedDB still has vendor prefixes in some browsers (see Compatibility table).

Example

In the following code snippet, we open a database asynchronously and make a request. Event handlers are registered for responding to various situations.

// using a self-executed function to be able to create our indexedDB variable without polluting the global scope
(function(window) {

// Taking care of the browser-specific prefixes.
// no need for ms prefix as they only ship it unprefixed, other browsers will probably do the same in the future.
var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
// VERY IMPORTANT: if you are outside a function, you have to use :
// window.indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
... 

// Open a database called myAwesomeDatabase
var request = indexedDB.open('myAwesomeDatabase'); // version == 1 (implicit)
// When a success event happens, do something.
request.onsuccess = function(event) {
    var db = this.result; // this === event.target === request
    var transaction = db.transaction('ObjectStore Name'); // default mode is "readonly"
    var curRequest = transaction.objectStore('ObjectStore Name').openCursor();
    curRequest.onsuccess = ...;
};

// handle error events
request.onerror = function(event) {
    ...;
};

})(this); // this == window

Method overview

IDBRequest open (in DOMString name);  {{ obsolete_inline() }} (some browser still implement it)
IDBOpenDBRequest open (in DOMString name, long long version);{{ gecko_minversion_inline('10') }}
IDBOpenDBRequest deleteDatabase (in DOMString name);
integer cmp (any first, any second);

Methods

open()

Warning: Some browsers still implement the method as specified in an older version of the standard, with only the single parameter, name. The specifications have changed, but the changes have not yet been implemented by all browser. See the compatibility table for more information.
Warning: At the moment due to bugs or on purpose it's impossible to open an IndexedDB database from a local webpage (running from file:///) or from a Web App see {{Bug(643318)}}.
IDBOpenDBRequest open (in DOMString name, long long version);

Request opening a connection to a database. The method returns an IDBOpenDBRequest object immediately, and performs the open operation asynchronously. 

The open operation—which is performed in a separate thread—consists of the following steps:

  1. If a database of the given name already exists:
    • Wait until any existing versionchange transactions have finished.
    • If the database has a deletion pending, wait until it has been deleted.
  2. If the version of the existant database is higher than the version specified, abort and return a DOMError of type VersionError.
  3. If the version of the existant database is lower than the version specified, a versionchange transaction is executed.
  4. If no database with that name exists, create a database with the provided name, with its version set to the given version, or 1 if missing, and no object stores.
  5. Create a connection to the database.

If the operation is successful, a success event is fired on the request object that is returned from this method, with its result attribute set to the new IDBDatabase object for the connection.

If an error occurs while the database connection is being opened, then an error event is fired on the request object returned from this method.

Parameters
name
The name of the database.
version
The version of the database.
Returns
IDBOpenDBRequest
The request object on which subsequent events related to this request are fired. Some browsers still implement the older specification wherein this method returned the IDBRequest object.
Exceptions

This method may raise a DOMException with a DOMError of the following types:

Exception Description
TypeError The value of version is zero or a negative number or not a number.

deleteDatabase()

Request deleting a database. The method returns  an IDBOpenDBRequest object immediately, and performs the deletion operation asynchronously.

IDBOpenDBRequest deleteDatabase (in DOMString name);

The deletion operation (performed in a different thread) consists of the following steps:

  1. If there is no database with the given name, exit successfully.
  2. Fire an IDBVersionChangeEvent at all connection objects connected to the named database, with version set to null.
  3. If any connection objects connected to the database are still open, fire a blocked event at the request object returned by the deleteDatabase method, using IDBVersionChangeEvent with version set to null.
  4. Wait until all open connections to the database are closed.
  5. Delete the database.

If the database is successfully deleted, then a success event is fired on the request object returned from this method, with its result set to null. If an error occurs while the database is being deleted, then an error event is fired on the request object that is returned from this method.

Tip: If the browser you are using hasn't implemented this yet, you can delete the object stores one by one, thus effectively removing the database.

Parameters
name
The name of the database.
Returns
IDBOpenDBRequest
The request object on which subsequent events related to this request are fired. Some browsers still implement the older specification wherein this method returned the IDBRequest object.

cmp()

Compares two values as keys to determine equality and ordering for IndexedDB operations, such as storing and iterating. Do not use this method for comparing arbitrary JavaScript values, because many JavaScript values are either not valid IndexedDB keys (booleans and objects, for example) or are treated as equivalent IndexedDB keys (for example, since IndexedDB ignores arrays with non-numeric properties and treats them as empty arrays, so any non-numeric array are treated as equivalent). This throws an exception if either of the values is not a valid key.

integer cmp (any first, any second);
Parameters
first
The first key to compare.
second
The second key to compare.
Returns
Integer
Returned value Description
-1 1st key is less than the 2nd key
0 1st key is equal to the 2nd key
1 1st key is greater than the 2nd key
Exceptions

This method may raise a DOMException with a DOMError of the following types:

Attribute Description
DataError One of the supplied keys was not a valid key.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
open() old specification 12{{ property_prefix("webkit") }} {{ CompatGeckoDesktop("2.0") }}{{ property_prefix("moz") }} until {{ CompatGeckoDesktop("9.0") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
open() new specification

23{{ property_prefix("webkit") }}

24

{{ CompatGeckoDesktop("10.0") }}{{ property_prefix("moz") }}

{{ CompatGeckoDesktop("16.0") }}

10 {{ CompatNo() }} {{ CompatNo() }}
cmp ()

16{{ property_prefix("webkit") }}

24

{{ CompatGeckoDesktop("11.0") }}{{ property_prefix("moz") }}

{{ CompatGeckoDesktop("16.0") }}

10 {{ CompatNo() }} {{ CompatNo() }}
deleteDatabase()

17{{ property_prefix("webkit") }}

24

{{ CompatGeckoDesktop("10.0") }}{{ property_prefix("moz") }}

{{ CompatGeckoDesktop("16.0") }}

10 {{ CompatNo() }} {{ CompatNo() }}
Feature Android Chrome Mobile Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatNo() }} Yes{{ property_prefix("webkit") }} {{ CompatGeckoMobile("6.0") }} {{ CompatUnknown() }} {{ CompatNo() }} {{ CompatNo() }}

Be careful in Chrome as it still implements the old specification along the new one. Similarly it still has the prefixed webkitIndexedDB property even if the unprefixed indexedDB is present.

Revision Source

<p>The <code>IDBFactory</code> interface of the <a href="/en/IndexedDB" title="en/IndexedDB">IndexedDB&nbsp;API</a> lets applications asynchronously access the indexed databases. The object that implements the interface is&nbsp; <code>window.indexedDB</code>. You open—that is, create and access—and delete a database with the object and not directly with <code>IDBFactory</code>.</p>
<p>The object <code>indexedDB</code> still has vendor prefixes in some browsers (<a href="#Browser_Compatibility" title="#Browser_Compatibility">see Compatibility table</a>).</p>
<h2 id="Example">Example</h2>
<p>In the following code snippet, we open a database asynchronously and make a request. Event handlers are registered for responding to various situations.</p>
<pre class="brush:js;">
// using a self-executed function to be able to create our indexedDB variable without polluting the global scope
(function(window) {

// Taking care of the browser-specific prefixes.
// no need for ms prefix as they only ship it unprefixed, other browsers will probably do the same in the future.
var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
// VERY IMPORTANT: if you are outside a function, you have to use :
// window.indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
... 

// Open a database called myAwesomeDatabase
var request = indexedDB.open('myAwesomeDatabase'); // version == 1 (implicit)
// When a success event happens, do something.
request.onsuccess = function(event) {
    var db = this.result; // this === event.target === request
    var transaction = db.transaction('ObjectStore Name'); // default mode is "readonly"
    var curRequest = transaction.objectStore('ObjectStore Name').openCursor();
    curRequest.onsuccess = ...;
};

// handle error events
request.onerror = function(event) {
    ...;
};

})(this); // this == window</pre>
<h2 id="Method_overview">Method overview</h2>
<table class="standard-table">
  <tbody>
    <tr>
      <td><code><a href="/en/IndexedDB/IDBRequest" title="en/IndexedDB/IDBRequest">IDBRequest</a>&nbsp;<a href="#open" title="#open">open</a>&nbsp;(in&nbsp;<a href="/En/DOM/DOMString" title="en/DOM/DOMString">DOMString</a>&nbsp;name);&nbsp;</code> {{ obsolete_inline() }} (some browser still implement it)</td>
    </tr>
    <tr>
      <td><code><a href="/en/IndexedDB/IDBOpenDBRequest" title="en/IndexedDB/IDBOpenDBRequest">IDBOpenDBRequest</a> <a href="#open" title="#open">open</a> (in <a href="/En/DOM/DOMString" title="en/DOM/DOMString">DOMString</a> name, <a href="/en/NSPR_API_Reference/Long_Long_(64-bit)_Integers" title="en/NSPR_API_Reference/Long_Long_(64-bit)_Integers">long long</a> version);</code>{{ gecko_minversion_inline('10') }}</td>
    </tr>
    <tr>
      <td><code><a href="/en/IndexedDB/IDBOpenDBRequest" title="en/IndexedDB/IDBOpenDBRequest">IDBOpenDBRequest</a></code><code> <a href="#deleteDatabase" title="#deleteDatabase">deleteDatabase</a> (in <a href="/En/DOM/DOMString" title="en/DOM/DOMString">DOMString</a> name);</code></td>
    </tr>
    <tr>
      <td><code>integer <a href="#cmp">cmp</a> (any first, any second);</code></td>
    </tr>
  </tbody>
</table>
<h2 id="Methods">Methods</h2>
<h3 id="open" name="open">open()</h3>
<div class="warning">
  <strong>Warning:</strong>&nbsp;Some browsers still implement the method as specified in an older version of the standard, with only the single parameter, name. The specifications have changed, but the changes have not yet been implemented by all browser. <a href="#Browser_Compatibility" title="#Browser_Compatibility">See the compatibility table for more information.</a></div>
<div class="warning">
  <strong>Warning:</strong> At the moment due to bugs or on purpose it's impossible to open an IndexedDB database from a local webpage (running from file:///) or from a <a href="/en-US/docs/Accessibility/An_overview_of_accessible_web_applications_and_widgets" title="/en-US/docs/Accessibility/An_overview_of_accessible_web_applications_and_widgets">Web App</a> see {{Bug(643318)}}.</div>
<pre>
<a href="/en/IndexedDB/IDBOpenDBRequest" style="font-family: 'Courier New', 'Andale Mono', monospace; line-height: normal; " title="en/IndexedDB/IDBOpenDBRequest">IDBOpenDBRequest</a><span style="font-family: 'Courier New', 'Andale Mono', monospace; line-height: normal; "> </span><a href="#open" style="font-family: 'Courier New', 'Andale Mono', monospace; line-height: normal; " title="#open">open</a><span style="font-family: 'Courier New', 'Andale Mono', monospace; line-height: normal; "> (in </span><a href="/En/DOM/DOMString" style="font-family: 'Courier New', 'Andale Mono', monospace; line-height: normal; " title="en/DOM/DOMString">DOMString</a><span style="font-family: 'Courier New', 'Andale Mono', monospace; line-height: normal; "> name, </span><a href="/en/NSPR_API_Reference/Long_Long_(64-bit)_Integers" style="font-family: 'Courier New', 'Andale Mono', monospace; line-height: normal; " title="en/NSPR_API_Reference/Long_Long_(64-bit)_Integers">long long</a><span style="font-family: 'Courier New', 'Andale Mono', monospace; line-height: normal; "> version);</span></pre>
<p>Request opening a <a href="/en/IndexedDB#gloss_database_connection" title="en/IndexedDB#gloss database connection">connection to a database</a>. The method returns an <a href="/en-US/docs/IndexedDB/IDBOpenDBRequest" title="/en-US/docs/IndexedDB/IDBOpenDBRequest"><code>IDBOpenDBRequest</code></a> object&nbsp;immediately, and performs the open operation asynchronously.&nbsp;</p>
<p>The open operation—which is performed in a separate thread—consists of the following steps:</p>
<ol>
  <li>If a database of the given name already exists:
    <ul>
      <li>Wait until any existing <code><a href="/en/IndexedDB/IDBTransaction#VERSION_CHANGE" title="en/IndexedDB/IDBTransaction#VERSION CHANGE">versionchange</a></code>&nbsp;transactions have finished.</li>
      <li>If the database has a deletion pending, wait until it has been deleted.</li>
    </ul>
  </li>
  <li>If the version of the existant database is higher than the <code>version</code> specified, abort and return a <code>DOMError</code> of type <code>VersionError</code>.</li>
  <li>If the version of the existant database is lower than the <code>version</code> specified, a <code>versionchange</code> transaction is executed.</li>
  <li>If no database with that name exists, create a database with the provided name, with its version set to the given version, or 1 if missing, and no object stores.</li>
  <li>Create a connection to the database.</li>
</ol>
<p>If the operation is successful, a <code>success</code> event&nbsp;is fired on the request object that is returned from this method, with its <code>result</code> attribute set to the new <a href="/en/IndexedDB/IDBDatabase" title="en/IndexedDB/IDBDatabase">IDBDatabase</a> object for the connection.</p>
<p>If an error occurs while the database connection is being opened, then an <a href="/en/IndexedDB/IDBErrorEvent" title="en/IndexedDB/IDBErrorEvent">error event</a> is fired on the request object returned from this method.</p>
<h5 id="Parameters">Parameters</h5>
<dl>
  <dt>
    name</dt>
  <dd>
    The name of the database.</dd>
  <dt>
    version</dt>
  <dd>
    The version of the database.</dd>
</dl>
<h5 id="Returns">Returns</h5>
<h5 id="IDBOpenDBRequest"><a href="/en-US/docs/IndexedDB/IDBOpenDBRequest" title="/en-US/docs/IndexedDB/IDBOpenDBRequest"><code style="font-size: 14px; ">IDBOpenDBRequest</code></a></h5>
<dl>
  <dd>
    The request object on which subsequent events related to this request are fired. Some browsers still implement the older specification wherein this method returned the <code><a href="/en-US/docs/IndexedDB/IDBRequest" title="/en-US/docs/IndexedDB/IDBRequest">IDBRequest</a></code> object.</dd>
</dl>
<h5 id="Exceptions" style="line-height: 18px; ">Exceptions</h5>
<p style="font-size: 14px; line-height: 18px; ">This method may raise a&nbsp;<a href="/en-US/docs/DOM/DOMException" title="/en-US/docs/DOM/DOMException">DOMException</a>&nbsp;with a&nbsp;<a href="/en-US/docs/DOM/DOMError" title="/en-US/docs/DOM/DOMError">DOMError</a>&nbsp;of the following types:</p>
<table class="standard-table" style="font-size: 14px; line-height: 18px; ">
  <thead>
    <tr>
      <th scope="col" width="131">Exception</th>
      <th scope="col" width="698">Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><font face="Courier New, Andale Mono, monospace"><span style="line-height: normal; ">TypeError</span></font></td>
      <td>The value of version is zero or a negative number or not a number.</td>
    </tr>
  </tbody>
</table>
<dl style="font-size: 14px; line-height: 18px; ">
</dl>
<h3 id="deleteDatabase" name="deleteDatabase">deleteDatabase()</h3>
<p>Request deleting a database. The method returns&nbsp;&nbsp;an <code><a href="/en-US/docs/IndexedDB/IDBOpenDBRequest" title="/en-US/docs/IndexedDB/IDBOpenDBRequest">IDBOpenDBRequest</a></code> object&nbsp;immediately, and performs the deletion operation&nbsp;asynchronously.</p>
<pre>
<code><a href="/en/IndexedDB/IDBOpenDBRequest" title="en/IndexedDB/IDBOpenDBRequest">IDBOpenDBRequest</a></code><span style="font-family: 'Courier New', 'Andale Mono', monospace; line-height: normal; "> </span><a href="#deleteDatabase" style="font-family: 'Courier New', 'Andale Mono', monospace; line-height: normal; " title="#deleteDatabase">deleteDatabase</a><span style="font-family: 'Courier New', 'Andale Mono', monospace; line-height: normal; "> (in </span><a href="/En/DOM/DOMString" style="font-family: 'Courier New', 'Andale Mono', monospace; line-height: normal; " title="en/DOM/DOMString">DOMString</a><span style="font-family: 'Courier New', 'Andale Mono', monospace; line-height: normal; "> name);</span></pre>
<p>The deletion operation (performed in a different thread) consists of the following steps:</p>
<ol>
  <li>If there is no database with the given name, exit successfully.</li>
  <li>Fire an <a href="/en/IndexedDB/IDBVersionChangeEvent" title="en/IndexedDB/IDBVersionChangeEvent">IDBVersionChangeEvent</a> at all connection objects connected to the named database, with <code><a href="/en/IndexedDB/IDBVersionChangeEvent#attr_version" title="en/IndexedDB/IDBVersionChangeEvent#attr version">version</a></code> set to <code>null</code>.</li>
  <li>If any connection objects connected to the database are still open, fire a <code>blocked</code> event at the request object returned by the <code>deleteDatabase</code> method, using <a href="/en/IndexedDB/IDBVersionChangeEvent" title="en/IndexedDB/IDBVersionChangeEvent">IDBVersionChangeEvent</a> with <code><a href="/en/IndexedDB/IDBVersionChangeEvent#attr_version" title="en/IndexedDB/IDBVersionChangeEvent#attr version">version</a></code> set to <code>null</code>.</li>
  <li>Wait until all open connections to the database are closed.</li>
  <li>Delete the database.</li>
</ol>
<p>If the database is successfully deleted, then a <code>success</code> event&nbsp;is fired on the request object returned from this method, with its <code>result</code> set to <code>null</code>.&nbsp;If an error occurs while the database is being deleted, then an <code>error</code> event is fired on the request object that is returned from this method.</p>
<p><strong>Tip:</strong> If the browser you are using hasn't implemented this yet, you can delete the object stores one by one, thus effectively removing the database.</p>
<h5 id="Parameters">Parameters</h5>
<dl>
  <dt>
    name</dt>
  <dd>
    The name of the database.</dd>
</dl>
<h5 id="Returns">Returns</h5>
<dl>
  <dt>
    <a href="/en-US/docs/IndexedDB/IDBOpenDBRequest" title="/en-US/docs/IndexedDB/IDBOpenDBRequest"><code style="font-size: 14px; ">IDBOpenDBRequest</code></a></dt>
  <dd>
    The request object on which subsequent events related to this request are fired. Some browsers still implement the older specification wherein this method returned the <code><a href="/en-US/docs/IndexedDB/IDBRequest" title="/en-US/docs/IndexedDB/IDBRequest">IDBRequest</a></code> object.</dd>
</dl>
<h3 id="cmp" name="cmp">cmp()</h3>
<p>Compares two values as keys to determine equality and ordering for IndexedDB operations, such as storing and iterating. Do not use this method for comparing arbitrary JavaScript values, because many JavaScript values are either not valid IndexedDB keys (booleans and objects, for example) or are treated as equivalent IndexedDB keys (for example, since IndexedDB ignores arrays with non-numeric properties and treats them as empty arrays, so any non-numeric array are treated as equivalent).&nbsp;This throws an exception if either of the values is not a valid key.</p>
<pre>
<span style="font-family: 'Courier New', 'Andale Mono', monospace; line-height: normal; ">integer </span><a href="#cmp" style="font-family: 'Courier New', 'Andale Mono', monospace; line-height: normal; ">cmp</a><span style="font-family: 'Courier New', 'Andale Mono', monospace; line-height: normal; "> (any first, any second);</span></pre>
<h5 id="Parameters">Parameters</h5>
<dl>
  <dt>
    first</dt>
  <dd>
    The first key to compare.</dd>
  <dt>
    second</dt>
  <dd>
    The second key to compare.</dd>
</dl>
<h5 id="Returns">Returns</h5>
<dl>
  <dt>
    Integer</dt>
  <dd>
    <table class="standard-table" width="434">
      <thead>
        <tr>
          <th scope="col" width="150">Returned value</th>
          <th scope="col" width="250">Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>-1</td>
          <td>1st key is less than the 2nd key</td>
        </tr>
        <tr>
          <td>0</td>
          <td>1st key is equal to the 2nd key</td>
        </tr>
        <tr>
          <td>1</td>
          <td>1st key is greater than the 2nd key</td>
        </tr>
      </tbody>
    </table>
  </dd>
</dl>
<h5 id="Exceptions">Exceptions</h5>
<p>This method may raise a&nbsp;<a href="/en-US/docs/DOM/DOMException" title="/en-US/docs/DOM/DOMException">DOMException</a>&nbsp;with a&nbsp;<a href="/en-US/docs/DOM/DOMError" title="/en-US/docs/DOM/DOMError">DOMError</a>&nbsp;of the following types:</p>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col" width="131">Attribute</th>
      <th scope="col" width="698">Description</th>
    </tr>
    <tr>
      <td><a href="/en-US/docs/DOM/DOMError" title="/en-US/docs/DOM/DOMError"><font face="Courier New, Andale Mono, monospace"><span style="line-height: normal;">DataError</span></font></a></td>
      <td>One of the supplied keys was not a valid key.</td>
    </tr>
  </thead>
  <tbody>
  </tbody>
</table>
<h2 id="Browser_Compatibility" name="Browser_Compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari (WebKit)</th>
      </tr>
      <tr>
        <td><code>open()</code> old specification</td>
        <td>12{{ property_prefix("webkit") }}</td>
        <td>{{ CompatGeckoDesktop("2.0") }}{{ property_prefix("moz") }} until {{ CompatGeckoDesktop("9.0") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
      <tr>
        <td><code>open()</code> new specification</td>
        <td>
          <p>23{{ property_prefix("webkit") }}</p>
          <p>24</p>
        </td>
        <td>
          <p>{{ CompatGeckoDesktop("10.0") }}{{ property_prefix("moz") }}</p>
          <p>{{ CompatGeckoDesktop("16.0") }}</p>
        </td>
        <td>10</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
      <tr>
        <td><code>cmp ()</code></td>
        <td>
          <p>16{{ property_prefix("webkit") }}</p>
          <p>24</p>
        </td>
        <td>
          <p>{{ CompatGeckoDesktop("11.0") }}{{ property_prefix("moz") }}</p>
          <p>{{ CompatGeckoDesktop("16.0") }}</p>
        </td>
        <td>10</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
      <tr>
        <td><code>deleteDatabase()</code></td>
        <td>
          <p>17{{ property_prefix("webkit") }}</p>
          <p>24</p>
        </td>
        <td>
          <p>{{ CompatGeckoDesktop("10.0") }}{{ property_prefix("moz") }}</p>
          <p>{{ CompatGeckoDesktop("16.0") }}</p>
        </td>
        <td>10</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Chrome Mobile</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE&nbsp;Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatNo() }}</td>
        <td>Yes{{ property_prefix("webkit") }}</td>
        <td>{{ CompatGeckoMobile("6.0") }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<p>Be careful in Chrome as it still implements the old specification along the new one. Similarly it still has the prefixed <code>webkitIndexedDB</code> property even if the unprefixed <code>indexedDB</code> is present.</p>
Revert to this revision