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
6
votes
2 answers

Web SQL get column list from table

I try get column list from Web sql (Chrome local database). Оne of the decisions - get info from sqlite_master SELECT name, sql FROM sqlite_master WHERE type="table" AND name = "'+name+'"; For example i get this result CREATE TABLE table_name ( id…
MikeLP
  • 198
  • 1
  • 1
  • 9
6
votes
4 answers

Cross browser HTML5 storage library

I have one requirement where should be stored locally when internet is not available. It should handle it in cross browser compatible way. Now as I know there are variety of options to store the data locally (indexedDB, WebSQL, localStorage). All I…
Jack
  • 7,433
  • 22
  • 63
  • 107
6
votes
1 answer

Make function call wait for web SQL query

Primecheck function is supposed to return true or false whether passed number is prime or not. If the number is prime, function adds it to PRIMES table. This is a Sieve of Eratosthenes algorithm, but it's not finished yet. function primecheck…
harryfonda
  • 117
  • 3
  • 10
6
votes
3 answers

HTML/JS as interface to local SQLite database

I'm writing a pretty simple database application, which I want to be locally stored (as opposed to looking up a remote database). I like HTML/Javascript for designing interfaces, and they're cross-platform (everybody has a browser!), so I'd really…
Daniel Buckmaster
  • 7,108
  • 6
  • 39
  • 57
6
votes
2 answers

IndexedDB very slow compared to WebSQL, what am i doing wrong?

I made a demo chrome extension to compare websql and indexeddb and to learn how both worked in more detail. To my surprise it showed that indexeddb is a lot slower even compared to the most naive sql command. Since websql have been deprecated in…
user1309439
  • 61
  • 1
  • 2
5
votes
3 answers

how to store data to database in HTML5

I'm trying to build a mobile app in HTML5. I need to store the data in the database. I've look at the web sql databases. I might not understand this correctly but this looks like a local storage to me. any idea or reference how to approach…
ordinaryman09
  • 2,761
  • 4
  • 26
  • 32
5
votes
2 answers

Access localStorage or web database created in PhoneGap from Android native code

How is it possible to access Web SQL database created in PhoneGap app from native code in Android? I have a local notification plugin set up and what I want to achieve is fetch user setting from web database to set a correct interval for my alarm.
micadelli
  • 2,482
  • 6
  • 26
  • 38
5
votes
1 answer

Known HTML5 localStorage, WebSQL limitations on tablets (webkit)

I'm about to embark on a project targeted at tablet devices - essentially a bunch of "surveys", that need to work offline. Constraints: Hopefully device agnostic Hopefully work on a desktop too Needs to store 10-25Mb worth of data As a result…
scunliffe
  • 62,582
  • 25
  • 126
  • 161
5
votes
1 answer

How to compress WebSQL database from JavaScript

I have developed an app using HTML5 + WebSQL which synchronizes data from the local database to a server. When data is deleted, the size of the sqlite database file remains the same. I know that this contains empty space and it will be filled when…
SzilardD
  • 1,611
  • 2
  • 22
  • 40
5
votes
2 answers

HTML5 Web SQL database file location in chrome

I want to use HTML Web SQL for my next web application project, so I did a quick search to find a tutorial and wrote the following code: Web SQL Test
Latheesan
  • 23,247
  • 32
  • 107
  • 201
5
votes
1 answer

openDatabase Hello World

I'm trying to learn about openDatabase, and I think I'm getting it to INSERT INTO TABLE1, but I can't verify that the SELECT * FROM TABLE1 is working.
Phillip Senn
  • 46,771
  • 90
  • 257
  • 373
5
votes
2 answers

WebSQL syntax on IndexedDb

I have an application that use WebSQL. I want to support IndexedDB too (For Browsers without WebSql support). Is there any libary that use sql-syntax but works with indexedDB / LocalStorage in background? I don't want to change all my querys and…
Cracker0dks
  • 2,422
  • 1
  • 24
  • 39
5
votes
1 answer

Web SQL transaction does not execute properly in javascript function

I have JavaScript function that returns array of selected values from my local database. var dataBase = { select : selectFunction } var db = openDatabase(..); var data=[ ]; function selectFunction() { db.transaction(function (t) { …
ToTa
  • 3,304
  • 2
  • 19
  • 39
5
votes
2 answers

openDatabase error at Safari 7

I have the following code in my application: openDatabase('main', '1.0', 'Database display name', 50 * 1024 * 1024) It worked fine until Apple introduced Safari 7. Now it fails with the following exception: SecurityError: DOM Exception 18: An…
Marat Faskhiev
  • 1,282
  • 6
  • 17
  • 37
5
votes
2 answers

Increase the size of the WebSQL quota in a WebView

In a normal Android web app the maximum size for a WebSQL database is normally around 8MB. In a hybrid web app I am making I would like to increase this limit. How would I go about doing that? It seems that WebStorage might have something to do with…
oligofren
  • 20,744
  • 16
  • 93
  • 180