开发者

Features of openDatabase

I am looking at building an application that stores data locally using openDatabase.

I have a few questions about it.

  1. Can the database been accessed any other way about from the website? I assume using something like firebug I could make queries against the database.But I am not sure if another website uses the same database name it will use or be able to update my website.

  2. Are there any visual tools to be able to开发者_开发知识库 access the stored data?

  3. Is the database stored against the logged in user or the computer? for example if a user logs into my website and the database is created and content inserted into the tables. If a different user logs into the computer and accesses the same site will a new database be created or will it reference the already created db?

Thank you!


  1. The browser creates a database when window.openDatabase is called in JavaScript. Every database is stored by the browser on a per domain basis (i.e. if two domains use the same database name, the browser will store them separately). This also means that the database is visible to all the pages in that particular domain. Tools like Firebug are used for debugging client-side scripts and thus they can access the database, but then again so can any bookmarklet or external script.

  2. Why would you need any visual tools to be able to access the stored data? The data is stored on the client-side and not on the server. Thus only the client will be able to modify it. Unless you are planning to make a local web page and store data for personal use, there's absolutely no need to make a front-end for the database.

  3. The database is stored on a per user basis. Internally the browser stores the database in the current user's directory. For example, Opera on Windows it stores it in C:\Users\%USERNAME%\AppData\Local\Opera.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜