4
I was reading about webSql and I came up with this question, what is the advantage of working with webSql since it runs client-side?
4
I was reading about webSql and I came up with this question, what is the advantage of working with webSql since it runs client-side?
6
I suspect the real question is: What is the advantage of using client-side databases? (i.e. webSql
, or any other technology)
Customer side comics (such as the Webstorage referred to by @utluiz) should be used when the information is too complex to use cookies, and when the information is transitory/transient/momentanea.
In such cases, using the BD in the client’s browser decreases the pressure on the server. Instead of storing a large amount of data on the server, small amounts of data are stored on multiple clients.
In Portugal we have an expression: "distribute the evil among the villages" ;)
3
I may be mistaken, but today it does not seem to have any advantage, since the body that maintained the standard (W3C) abandoned the project for lack of variety of implementations. Apparently, all browsers used the Sqlite.
The current W3C recommendation is to use Webstorage.
1
The Websql is a Sqlite-based solution, which because it is synchronous requests and has restrictions on the implementation behind the API was abandoned by W3C. However it is still available in several browsers and is a very good solution to store data on the client side, to decrease the need for constant communication with server or even work with data that only interest the user who is on the web page or application.
To replace Websql the W3C has as a proposal the Indexeddb which is a slightly different solution from the usual SQL, but asynchronous and allows the engine that will store the data by the browser to be independent of the access and write API of this data.
Finally, there are Javascript libraries that allow cross-browser compatibility, using the available technology to store the data.
Browser other questions tagged javascript websql
You are not signed in. Login or sign up in order to post.
Got it, @dcastro but in the case of websql it is possible to create databases and tables, insert and delete data with Javascript, this would leave my application vulnerable, so it is not very advantageous right?
– Odair
Yes, it is possible to do these operations, but only in the client-side comic book. When this information enters the server, it has to be validated - like any other information that enters the server. Cookies, foms, headers, etc - everything can be manipulated on the client’s side. So everything has to be validated.
– dcastro
be advantageous or will not only depend on the type of application. Not every web application needs reliability of the information contained in the database.
– Guilherme