![]() ![]() 'create table rainstorms (mood text, severity int)' , ![]() As you can see, the SQL statements (using the SQLite SQL dialect) are passed as strings to the database methods. Being a child of the late 2000s, it's a great example of "callback hell", as the code sample ( courtesy of Nolan Lawson) below impressively demonstrates. Web SQL also is an API that shows its age. This comes in direct conflict with Web SQL's requirement of behaving exactly as SQLite 3.6.19. The need to keep up with security and stability fixes dictates updating SQLite in Chromium. SQLite was not initially designed to run malicious SQL statements, yet implementing Web SQL means browsers have to do exactly this. The last version of the standard literally states "User agents must implement the SQL dialect supported by Sqlite 3.6.19". The Web SQL specification cannot be implemented sustainably, which limits innovation and new functionality. # Reasons for deprecating Web SQL # Sustainability and security concerns ![]() ![]() What's more, we're hoping that this example will help a new ecosystem of open-source databases to flourish! The release of file system access handles finally provides the new primitive on which custom storage solutions can be built. Our objective really is to let developers bring their own database to the web. In fact, we replaced it with something that will be maintained by the open-source community, served as a package that can be updated at will-without the burden of introducing fixes and new features directly into browsers. We're not planning to just remove Web SQL. Based on these creations, we feel that the developer community can iterate on and create new storage solutions faster and better than browser vendors. One example is DuckDB-Wasm, another is absurd-sql. With the advent of Wasm, SQL or NoSQL solutions can come to the web. # Rationale for leaving storage to web developers We recommend most users switch to SQLite compiled to WebAssembly, backed by the Origin Private File System (OPFS), especially those with strong performance requirements. A deprecation trial to keep using Web SQL is available from Chromium 117 (September 12, 2023) to Chromium 123 (March 26, 2024).Īs pointed out in the introduction, Web Storage API technologies like localStorage and sessionStorage, or the IndexedDB standard are good alternatives in many, but by far not all cases.Web SQL access in all contexts is no longer available in Chromium 119 (November 7, 2023).Web SQL access in all contexts is deprecated as of Chromium 115 (July 18, 2023) and a warning message is shown in the Chrome DevTools Issue panel.An enterprise policy to keep using the feature is available from Chromium 110 (February 7, 2023) to Chromium 123 (March 26, 2024). Web SQL access in insecure contexts is no longer available as of Chromium 110 (February 7, 2023).Web SQL access in insecure contexts was deprecated as of Chromium 105 (August 30, 2022) at which time a warning message was shown in the Chrome DevTools Issue panel.Web SQL was deprecated and removed for third-party contexts in Chromium 97 (November 16, 2021).This solution is now ready and outperforms Web SQL in many cases. We've worked with the SQLite team to create a SQLite implementation over WebAssembly. Our intention is to empower developers to create their own solutions for structured storage. These technologies show their strengths when it comes to key/value stores and structured data, but acknowledgedly also have weaknesses like the lack of a strong query language. The World Wide Web Consortium (W3C) encourages those needing web databases to adopt Web Storage API technologies like localStorage and sessionStorage, or IndexedDB. While it was implemented in WebKit (which powers Safari and early versions of Chrome) and remained active in the Blink engine (that powers Chrome after the switch from WebKit), Gecko (which powers Firefox) never implemented this feature and WebKit removed it in 2019. The Web SQL Database API, which allows you to store data in a structured manner on the user's computer (internally based on the SQLite database engine), was introduced in April 2009 and abandoned in November 2010. The current target version to remove Web SQL is Chromium 119 (November 7, 2023). This is a living post that will be updated as the deprecation steps outlined below happen. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |