ReasonJun

HTML : IndexedDB 본문

Frontend/HTML

HTML : IndexedDB

ReasonJun 2024. 1. 8. 15:59
728x90

 

IndexedDB is a powerful API provided by web browsers for managing a local NoSQL database within client-side applications. Here's a detailed breakdown of its key features and functionalities:

 

Purpose:

  • Persistently store large amounts of structured data in the user's browser, enabling offline-capable web applications.
  • Offer rich query capabilities for efficient data retrieval based on indexes.

Key Concepts:

  • Object stores: The fundamental data structure, resembling tables but holding JavaScript objects instead of rows and columns.
  • Keys: Unique identifiers used to access individual objects within an object store.
  • Indexes: Specialized structures built on top of object stores for fast searching based on specific data properties.
  • Transactions: Groups of operations ensuring data consistency by committing all changes or reverting them entirely in case of an error.

Advantages:

  • Large storage capacity: Compared to Web Storage, IndexedDB allows storing significantly more data (multiple megabytes to gigabytes).
  • Offline persistence: Data survives across browser sessions and even device reboots, enabling offline functionality.
  • Powerful querying: Supports efficient searches using indexes on various data properties.
  • Object-oriented: Stores and retrieves JavaScript objects directly, simplifying data manipulation.
  • Transactions: Ensure data consistency and integrity even with complex operations.

Considerations:

  • Complexity: Requires more programming effort compared to simpler storage APIs like Web Storage.
  • Asynchronous nature: All operations are asynchronous, demanding understanding of callback-based programming.
  • Security: Same-origin principle restricts access to the database, preventing third-party websites from stealing data.
  • Browser compatibility: While widely supported, older browsers might lack full functionality.

 

 

https://web.dev/articles/indexeddb?hl=ko#:~:text=IndexedDB%20is%20a%20low%2Dlevel,larger%20amounts%20of%20structured%20data.

 

IndexedDB 작업  |  Articles  |  web.dev

IndexedDB의 기본사항에 관한 가이드입니다.

web.dev

https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API

 

IndexedDB API - Web APIs | MDN

IndexedDB is a low-level API for client-side storage of significant amounts of structured data, including files/blobs. This API uses indexes to enable high-performance searches of this data. While Web Storage is useful for storing smaller amounts of data,

developer.mozilla.org

 

728x90

'Frontend > HTML' 카테고리의 다른 글

HTML : Iframe  (0) 2023.06.13
HTML : Video  (0) 2023.06.06
HTML : img / picture  (0) 2023.06.05
HTML : BEM (Block Element Modifier)  (0) 2023.06.05
HTML : Viewport / Open Graph / Twitter Cards / style / class / id  (0) 2023.06.05
Comments