Indexed Database API

From HandWiki
Short description: JavaScript application programming interface
IndexedDB
Indexed Database API
Native name
Indexed Database API
StatusFirst Public Working Draft
Latest version3.0
11 March 2021[1]
Preview versionEditor's Draft
11 March 2021[2]
Organization
CommitteeWeb Applications Working Group
Editors
Base standards
Related standards
DomainNoSQL databases
AbbreviationIndexedDB
Websitewww.w3.org/TR/IndexedDB/

The Indexed Database API (commonly referred to as IndexedDB) is a JavaScript application programming interface (API) provided by web browsers for managing a NoSQL database of objects. It is a standard maintained by the World Wide Web Consortium (W3C).[1]

As an alternative to the Web storage standard, IndexedDB can provide more storage capacity. Web storage has fixed limits per website, but IndexedDB limits are "usually quite large, if they exist at all".[5]

Use cases for IndexedDB include caching web application data for offline availability.[6] Some browser modules, such as devtools or extensions, may also use it for storage.

History

Support for IndexedDB was added to Firefox version 4,[7] Google Chrome version 11,[8] Internet Explorer version 10,[9] Safari version 8,[10] and Microsoft Edge version 12.[11]

Web SQL Database was a prior API developed by Apple.[12] But Firefox refused to add support for it and argued against it becoming a standard because it would codify the quirks of SQLite.[13][14] It was thus deprecated in favor of IndexedDB.[15]

IndexedDB 1.0 became a W3C Recommendation on January 8, 2015.[16] IndexedDB 2.0 became a W3C Recommendation on January 30, 2018.[17][3] IndexedDB 3.0 is currently a First Public Working Draft.[1]

Performance

Because IndexedDB is running inside of the security sandbox of a browser, all operations have to go through various security layers which decreases the performance of IndexedDB. With IndexedDB 2.0 [17] the getAll() method was added which allows to improve performance on bulk read operations.


References

  1. 1.0 1.1 1.2 1.3 1.4 Web Applications Working Group (2021-03-11). "Indexed Database API 3.0". in Alabbas, Ali. Web Applications Working Group. https://www.w3.org/TR/IndexedDB/. 
  2. Web Applications Working Group (2021-03-11). "Indexed Database API 3.0". in Alabbas, Ali. Web Applications Working Group. https://w3c.github.io/IndexedDB/. 
  3. 3.0 3.1 Web Applications Working Group (2018-01-30). "Indexed Database API 2.0". in Alabbas, Ali. Web Applications Working Group. https://www.w3.org/TR/IndexedDB-2/. 
  4. "Indexed Database API". 2015-01-08. https://www.w3.org/TR/2015/REC-IndexedDB-20150108/#h-acknowledgements. 
  5. "Working with IndexedDB". Google. https://developers.google.com/web/ilt/pwa/working-with-indexeddb. 
  6. "Using IndexedDB". Mozilla. https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB. 
  7. "IndexedDB - MDC Doc Center". Developer.mozilla.org. https://developer.mozilla.org/en/IndexedDB. 
  8. "IndexedDB - Chrome Platform Status". The Chromium Projects. 2012-05-21. https://chromestatus.com/feature/6507459568992256. 
  9. IndexedDB, MSDN, 2012-03-14, http://msdn.microsoft.com/en-us/library/ie/hh673548(v=vs.85).aspx, retrieved 2012-05-24 
  10. "OS X Yosemite v10.10 § App Features". Apple. 2017-07-09. https://developer.apple.com/library/content/releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_10.html#//apple_ref/doc/uid/TP40014484-SW1. 
  11. "IndexedDB". n.d.. https://caniuse.com/indexeddb. 
  12. Shankland, Stephen (2010-03-12). "Consensus emerges for key Web app standard | Deep Tech - CNET News". News.cnet.com. https://www.cnet.com/news/consensus-emerges-for-key-web-app-standard/. 
  13. "Well, I'm Back: Not Implementing Features Is Hard". Weblogs.mozillazine.org. 2010-06-04. https://robert.ocallahan.org/2010/06/not-implementing-features-is-hard_03.html. 
  14. "Beyond HTML5: Database APIs and the Road to IndexedDB – Mozilla Hacks - the Web developer blog". 2010-06-01. https://hacks.mozilla.org/2010/06/beyond-html5-database-apis-and-the-road-to-indexeddb. 
  15. "html5 - Why is Web SQL database deprecated?". https://softwareengineering.stackexchange.com/questions/220254/why-is-web-sql-database-deprecated. 
  16. Web Applications Working Group (2015-01-08). "Indexed Database API". Web Applications Working Group. https://www.w3.org/TR/2015/REC-IndexedDB-20150108/. 
  17. 17.0 17.1 W3C (2018-01-30). "Indexed Database API 2.0 is now a W3C Recommendation | W3C News". https://www.w3.org/blog/news/archives/6795. 

External links