Documentation
Easy steps to use Client Data Storage
Using the Client Data Storage library, we can perform data management on the client side with a larger size than using regular storage, but also efficiently. This library uses Indexeddb to run the system. So we need to make sure that the device we are using supports Indexed DB. Because the storage system uses Indexed DB, the storage object is JSON (NoSQL Database).
📦 Introduction
This library consists of two kinds of storage
1. Client Database
2. Client Storage
Both types have the same system, namely using IndexedDB as a storage medium, but these two types have different implementations. We will discuss after this one by one.
🧰 Installation
To add client data storage to our project, we can use a CDN link bellow. Use the recommended link, which is the link with the minified file.
https://cdn.jsdelivr.net/gh/caturdev/clientdatastorage@0.0.2/src/index.min.js
Or non-minified files (not recommended)
https://cdn.jsdelivr.net/gh/caturdev/clientdatastorage@0.0.2/src/index.js
<script src="https://cdn.jsdelivr.net/gh/caturdev/clientdatastorage@0.0.2/src/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/caturdev/clientdatastorage@0.0.2/src/index.js"></script>
or you can download and import the file src/index.js manually from the clientdatastorage repository, as in the following example
<script src="goto_clientdatastorage_folder/src/index.js"></script>
To check whether ClientDataStorage has been installed perfectly in our project, just check on our IndexedDB, whether there is ClientDB or not, the step is to open the dev tools in our browser, for Google Chrome, you can press ctrl + shift + i, then select menu Application. On the Application menu, we will get a figure like the following. If IndexedDB already has a ClientDB object, then ClientDataStorage can already be used in our project.
For Mozilla Firefox, you can press ctrl + shift + i, then select menu Storage. On the Storage menu, we will get a figure like the following. If IndexedDB already has a ClientDB object, then ClientDataStorage can already be used in our project.
Continue on to the next documentation to learn more about how to use it.