Finding the SQLite version used by Web SQL in Chrome

Google Chrome still includes support for Web SQL, the long since abandoned proposed standard for shipping a SQL engine in browser JavaScript. I was reminded of its existence today while reading about the new official sqlite3 wasm build.

Out of curiosity, I decided to see what version of SQLite was bundled with Chrome. I assumed it would be a very old version, since Web SQL is an idea from a long time ago now.

I used GitHub Copilot to write the code, so I wouldn't have to look up the APIs myself. I typed these two comments:

// Instantiate a new WebSQL database
// Execute a SQL query returning sqlite_version()

Copilot completed the following:

// Instantiate a new WebSQL database
var db = openDatabase('mydb', '1.0', 'Test DB', 2 * 1024 * 1024);
// Execute a SQL query returning sqlite_version()
db.transaction(function (tx) {
    'SELECT sqlite_version()',
    function (tx, results) {

I pasted that into my Chrome DevTools console... and got the following result:

{sqlite_version(): '3.39.4'}

This surprised my greatly, because SQLite 3.39.4 is the most recent release, and only came out a month ago on the 29th of September 2022!

I had a look on GitHub and found this commit from the 30th of September which bumps the version of SQLite included in Chromium.

My Chrome is version 107.0.5304.62 - I found the SQLite 3.39.4 upgrade mentioned in this log of commits between v106 and v107, which was linked to from this release post.


Created 2022-10-28T15:57:35-07:00 · Edit