Before we say anything at all about Web SQL, we regret to inform you that this spec is dead. Or dying. Or at least sentenced to death. Web SQL as a feature was a rather interesting one. It gave you access to miniature databases within the browser. For web developers who did server-side work, this was especially nice because they may have had some familiarity with SQL already. However, for reasons that are not important to this book, the specification has been EOLed (End of Life) and will (possibly) not be available in the future. That means—in theory—you shouldn’t even be reading this chapter.
Web SQL has very good support on mobile browsers, and was available before IndexedDB and much better supported than IndexedDB. It is entirely possible that as a developer, you will run into web apps making use of Web SQL. While we don’t recommend starting new projects with Web SQL, we hope this chapter will give you enough knowledge about the ins and outs of Web SQL so that if you have to help support an existing implementation you’ll know what to do.
As before, this particular client-side data storage technique will be tied to a particular domain. Storage limits are pretty varied and can range from 5 MB to 50 to more. Before we dive in, let’s cover some basic terms.
For those of you with experience working with traditional relational database servers, you can just go ahead and skip this section.