Dexdis

The simplest way to use IndexedDB in the browser.

Dexdis Logo

Dexdis is a thin wrapper around the browser database IndexedDB that is heavily inspired by the popular key/value database Redis.

Fast

Dexdis is a thin wrapper around the browser database IndexedDB and leverages the full power of the asynchronous API.

Small

Dexdis has no dependencies and comes as a single JavaScript file ready to power your storage needs. It weights 20kB minified and 4.7kB gzipped.

Easy

Dexdis supports all keys and values just as IndexedDB which means, you can save binary blobs just as easy as strings and use complex keys like ['a', ['key', 42]] natively.

Persistent

By using IndexedDB every command runs transactional and is fully persisted after completion. Multiple commands can be chained for more flexibility.

Compatibility

Dexdis supports every browser that implements IndexedDB. For older browsers (iOS, Android) that just implement the deprecated WebSQL standard you can use a polyfill.

Live Demo

Use the console to the try out Dexdis commands. For a list of available commands see the commands page. Every command has the form command(arg1, arg2, ...). Usually the last parameter is a callback, but the console will just print the result after you run the command. You can clear the database using the FLUSHDB command. To start you can play around with GET and SET. Dexdis also supports a time to live for keys, which means that after a given amount of time keys can expire and will be deleted. The EXPIRE command sets the seconds after which the key will expire. Check the remaining time with TTL. Keys can also be deleted manually using DEL.