[@naukriengineering] indexeddb

7
IndexedDB - The store in your browser - Sakshi Mehra FED

Upload: naukricom

Post on 21-Jan-2017

93 views

Category:

Engineering


2 download

TRANSCRIPT

IndexedDB- The store in your browser

- Sakshi MehraFED

What is IndexedDB?

HTML5 API to store data in browser Can store large amount of data on client side It stores key-pair values Allows fast indexing and searching It is not a structured query language It is non-relational (A NoSQL database) Works in asynchronous mode 

Browser Support

Internet Explorer 10+ Firefox Chrome Chrome for Android Firefox for Android BlackBerry 10

Why indexedDB

LocalStorage- Very simple API- but usage is capped at 5 MB- synchronous- good browser support

WebSQL- supported only on Chrome and Safari- asynchronous- relational database implementation

IndexedDB is the successor to both LocalStorage and WebSQLLet’s understand how.

Hence came IndexedDB up in its preference!!

Using IndexedDB:

All IndexedDB functionality is accessed throughwindow.indexedDB objectwindow.indexedDB = window.indexedDB || window.mozIndexedDB ||

window.webkitIndexedDB || window.msIndexedDB;

This is how IndexedDB looks

Thank you!