I’m trying to create a client side app in javascript that downloads a sqlite database off a server and allows the user to modify it. This app needs to be all client side though, and can’t rely on features only present in firefox for example. Is there any framework you are aware of that provides these features?
(Perhaps emulated of sorts?)
I’m trying to create a client side app in javascript that downloads a sqlite
Share
Short answer: you can’t.
Long answer: Javascript, by design, cannot access local machine files. If it’s okay to keep the db server-side and have the client interact with it, the server can execute queries and updates to the DB based on what the client asks it to do (a la web service). This is true for HTML5 browsers as well.
Some browsers, such as firefox and chrome, come with packages that will allow the browser to talk to sqlite dbs, but they are not written in javascript and can do things that javascript cannot, which is why they are included as browser-specific packages instead of as js scripts.