Questions tagged [web-sql]

Web SQL Database is a SQL-based API allowing a web pages to store and retrieve structured data locally. It is based on, but not the same as SQLite.

Web SQL Database is a SQL-based API allowing web browsers/extensions/apps to store structured data locally. It is based on SQLite and, in practice, has been implemented solely on SQLite.

The API is currently supported by Google Chrome, Opera and Safari. But, The W3C has abandoned Web SQL in favor of Web Storage and the Indexed Database API. From the Web SQL spec:

... specification work has stopped. The specification reached an impasse: all interested implementors have used the same SQL backend (SQLite), but we need multiple independent implementations to proceed along a standardisation path.

Mozilla will not implement Web SQL DB, opting to implement IndexedDB instead, and Microsoft has hinted that they are more likely to implement IndexedDB than Web SQL.

Resources

855 questions
13
votes
3 answers

Phonegap: WebSql or SqLite?

I have been working with phonegap for little time, and i'm having some trouble with the concept of storage in it. So, the documentation states that there is this database that you can open, and it is a SQLite implementation."window.openDatabase…
Malavos
  • 429
  • 3
  • 12
  • 27
12
votes
2 answers

HTML5 WebSQL: how to know when a db transaction finishes?

I've the following code that gets a json recordset and insert some data in three different tables on the client Web Sql storage. How can I intercept the end of databaseSync() function? What I want to do is display an alert or better an ajax spinner…
delmi
  • 138
  • 1
  • 1
  • 6
12
votes
3 answers

Sync indexedDB with mysql database

I am about to develop an application where employees go to service repair machines at customer premises. They need to fill up a service card using a tablet or any other mobile device. In case of no Internet connection, I am thinking about using…
blaise
  • 383
  • 1
  • 5
  • 16
11
votes
2 answers

html 5 storage websql, and localStorage : for how long data is stored?

With new Html 5 there are 3 main ways to store data in your browser: localStorage WebSQL DB Indexed DB I wanted to know, for each of the types, for how long data is stored? If the user enters the day after, the data will still be there? after one…
Mateu
  • 2,636
  • 6
  • 36
  • 54
11
votes
1 answer

Web SQL Storage Limitations in Chrome and Android?

So I am writing a web app that needs to store ~40MB of offline data in a offline Web SQL database. It needs to work in Chrome (desktop), Safari (desktop and mobile) and android's browser. Now I know that Web SQL is supported in these browsers and I…
user1231175
  • 137
  • 1
  • 2
  • 6
10
votes
4 answers

Where is data stored when using an HTML 5 Web SQL Database

I just read something about HTML 5 Web SQL Databases. I did a little search on here and Google but couldn't find a simple to the point answer. Can someone tell me, where is the data stored when using this? In memory or a text file or something…
JasonDavis
  • 48,204
  • 100
  • 318
  • 537
10
votes
1 answer

IndexedDB Performance and IndexedDB v/s WebSQL performance comparison

WebSQL and IndexedDB are both DB API for accessing (CRUD) the underlying embedded database in the web browser. Which, if I am correct, is like SQL for accessing (CRUD) any client-server database like Oracle etc. (in many case support for both WebSQL…
hagrawal7777
  • 14,103
  • 5
  • 40
  • 70
10
votes
1 answer

How do I execute multiple statements in Web SQL?

Is there a way to execute multiple statements in a single transaction? I want to do something like: db.transaction(function (tx) { tx.executeSql( "CREATE TABLE Foo(ID INTEGER); CREATE TABLE Bar(ID INTEGER)", function (tx,…
digita1-anal0g
  • 501
  • 7
  • 19
10
votes
2 answers

How to make the user login for an offline web app?

I am building an offline web app targeting iPhone and other mobile devices. Is there any way we can keep the user authentication saved using WebSql local storage? So when you open the web app while it's offline, I want Either user to be logged in…
billgajen
  • 153
  • 2
  • 8
9
votes
2 answers

WebSql iOS13 Support Removed, alternative solutions before to migrate

The new iOS 13 which was released this week no longer supports WebSQL (bot Safari and Chrome). I see that the best solution would be migrate to indexedDB, but I need to use it right away. Since it cannot be downgraded from a Phone, does anybody have…
peterdest
  • 285
  • 3
  • 11
9
votes
1 answer

difference between window.openDatabase() and window.sqlitePlugin.openDatabase() functions?

Using Cordova version 3.x and Android version 2.x to 4.x. I am wondering: Is my understanding correct that all android devices by default have an sqlite program/interface for creating sqlite database? Do both the above database function calls…
frank
  • 3,180
  • 3
  • 16
  • 18
9
votes
6 answers

How to make a WebSQL query synchronous?

Consider: var globalvar; function viewyearmain() { db.transaction(function (tx) { tx.executeSql('SELECT * FROM BUDGET WHERE holdingtype="month"', [], function (tx, results) { var len = results.rows.length; msg = len; …
user2058890
  • 93
  • 1
  • 1
  • 3
9
votes
2 answers

SECURITY_ERR: DOM Exception 18 on openDatabase

I have a web-based Android app that uses WebSQL for storage. For some reason, calling openDatabase at one point (in response to a button click), causes a DOMException with the message "SECURITY_ERR: DOM Exception 18". Note that I am not using…
Goldsmith
  • 508
  • 7
  • 13
8
votes
2 answers

Why are my data saved in WebSQL and not in IndexedDB? (ionic)

I can't understand this simply thing. I need to store data in a database so, following the ionic documentation, I did exactly what this page says: https://ionicframework.com/docs/storage/ I read on web that WebSQL is deprecated so I'd like to use…
AlessioF
  • 453
  • 2
  • 8
  • 19
8
votes
2 answers

Javascript WebSQL query within for loop. How to know when finished?

I guess I have a relative simple question, but I keep thinking in circles and even Google is not giving me an answer I can work with. Basically I am trying to copy some records that are stored locally using WebSQL. Copying is not the problem, but I…
user1749815
  • 83
  • 1
  • 4
1
2
3
56 57