Skip to content

Browser Compatibility

web-sqlite-js leverages modern browser APIs to provide high-performance, persistent SQLite storage. To use this library, the user's browser must support the following capabilities.

Minimum Browser Versions

Based on the combined requirements above (primarily restricted by OPFS and DecompressionStream), the following are the minimum recommended browser versions:

BrowserMinimum VersionNote
Google Chrome102+Full support for OPFS and SAB.
Mozilla Firefox113+Required for DecompressionStream and OPFS.
Apple Safari17+Required for full OPFS support.
Microsoft Edge102+Same engine as Chrome.

Important: Security Requirements

Even with a compatible browser, two critical security constraints must be met:

1. HTTPS Environment

Secure contexts are required for OPFS and SharedArrayBuffer. The library will not function over plain HTTP (except for localhost).

2. COOP/COEP Headers

To enable SharedArrayBuffer (which SQLite uses for file locking), your server must send the following HTTP headers:

http
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp

Without these headers, the browser will disable SharedArrayBuffer, and the library will throw an error. For setup instructions, see the Getting Started guide.

Required Web APIs

FeaturePurposeMinimum Requirement
OPFSPersistent file storage on the user's device.Chrome 102, Firefox 111, Safari 17
WASMRunning the SQLite engine at near-native speed.All modern browsers
SharedArrayBufferHigh-performance locking and concurrency.Chrome 68, Firefox 79, Safari 15.2
DecompressionStreamOn-the-fly decompression of the SQLite WASM binary.Chrome 80, Firefox 113, Safari 16.4
Module WorkersRunning logic in background threads via ES Modules.Chrome 80, Firefox 114, Safari 15

Released under the MIT License.