Explain IndexedDB transactions and readonly vs readwrite modes

WHAT IT TESTS: Understanding of IndexedDB's transactional model and concurrency. ANSWER OUTLINE: Every operation needs a transaction; readonly allows concurrent readers, readwrite is exclusive; they auto-commit when idle.
WHAT IT TESTS: Whether you grasp IndexedDB's transactional model and why every operation runs inside a transaction. ANSWER OUTLINE: A strong answer states that all reads and writes happen inside a transaction with a defined lifetime; explains that readonly transactions can run concurrently on the same object store while readwrite transactions get exclusive access; notes that transactions auto-commit when idle and that reusing a completed transaction throws.
Read the original → developer.mozilla.org
- #indexeddb
- #transactions
- #web storage
- #browser apis
- #concurrency
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.