Web Locks Visualizer
The Web Locks API coordinates work across tabs, but held and pending locks are invisible. This tool snapshots the entire lock queue for the current origin, tracks changes live, and lets you acquire test locks to see exclusive vs shared behavior.
Tool interface
Lock queue
Held locks
| Name | Mode | Client |
|---|
Pending queue
| Name | Mode | Client |
|---|
Change log
Introduction
Multi-tab apps use Web Locks to serialize access to shared resources like IndexedDB or sync queues. When a race condition occurs, you need to see who holds what. This visualizer exposes the entire lock queue in real time.
How it works
- Calls
navigator.locks.query()to read held and pending locks. - Polls on an interval and logs state changes.
- Acquires test locks via
navigator.locks.request()to demo queueing. - Releases held test locks manually or after a timed duration.
Privacy
All queries are local via the Web Locks API. Lock state never leaves the browser. No account, no API key.
Limitations
- Only inspects the current origin's locks.
clientIdis opaque and can't be mapped to a specific tab.- The Web Locks API is not available in every browser.
FAQ
What is the difference between shared and exclusive locks?
An exclusive lock allows only one holder at a time. A shared lock allows multiple concurrent holders, useful for read-heavy coordination.
Is my data uploaded?
No. Everything runs locally in your browser.