In the latest version of TypeScript I can finally narrow down the total addressable tables to only the tables enumerated in the first argument array to my transaction() function. I've wanted to be able to do this for over two years.
Now it's impossible to compile code to accidentally query a table that isn't opened. 😅
In the previous tutorials, I explained how to build a quiz application. You can review them here. First Quiz App Second Quiz App – with more features We would then cover the following: Creating the index.html and Stylesheet Building the QuestionManager.js Script 1. Create the index.html File and the Stylesheet These have been …
In the previous tutorials, I explained how to build a quiz application. You can review them here. First Quiz App Second Quiz App – with more features We would then cover the following: Creating the index.html and Stylesheet Building the QuestionManager.js Script 1. Create the index.html File and the Stylesheet These have been …
In this blogpost I want to describe how to develop a todo application which stores the items in the IndexedDb and synchronises it later if the app gets back online.
After this blogpost you should have an example how to use the IndexedDb in your applications, how to register to the online and offline commands and send items if the event comes up.
The code to this blogpost can be found here https://github.
IndexedDB là một công cụ mạnh mẽ để quản lý database phía server nhưng sử dụng lại quá khó. Vì vậy, localForage chính là một giải pháp hoàn hảo.
LOCALFORAGE: GIẢI PHÁP HOÀN HẢO CHO INDEXEDDB
IndexedDB là một local database dạng NoSQL cho phép lưu trữ dữ liệu ngay trên trình duyệt.
Nó cho phép lưu trữ một lượng dữ liệu lớn với các kiểu dữ liệu khác nhau (bao gồm cả file/blob); hỗ trợ trên nhiều trình duyệt và cung cấp khả năng truy cập nhanh.
Qua đó, IndexedDB giúp cho web app có khả năng hoạt động offline một cách mượt mà.
Tuy nhiên, IndexedDB lại có nhược điểm lớn là nó chỉ cung cấp API cấp thấp.
Khi sử dụng IndexedDB bạn phải quan tâm đến những thứ như: transaction, objectStore, cursor,… và nó còn không hỗ trợ Promise.
Điều này làm cho việc sử dụng IndexedDB trở nên khá khó khăn và phức tạp.
May mắn thay, localForage đã ra đời và giúp cho việc sử dụng IndexedDB trở nên đơn giản hơn rất nhiều.
The draft of Indexed Database API 2.0 is almost complete, providing several new APIs for fine-grained access to IndexedDB. The good news is that all these new APIs are implemented in Firefox and will be available in the release of Firefox 51 (currently available in Developer Edition, scheduled for general release in January 2017). In this article, we will share some examples of how to use these APIs to access IndexedDB in a better way.
IndexedDB is an API for storing significant amounts of structured data in user’s browser. It helps to do high performance searches using indexes. The data stored in IndexedDB is persistent and work in online and offline. It provides both a synchronous and an asynchronous API. In practice, however, all current implementations are asynchronous, and requests will not block the user…