Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I need a client side browser database. What are my options [closed]

I'm creating a web site that I think must have a client side database. The other option would be to stick everything on the server at the expense of increased complexity and decreased scalability. What options do I have? Must I build a plugin? Must I wait until everybody's HTML5 compliant?


Update There's been a lot of comments about why I would actually need this. Here are my thoughts. Tell me if I'm being silly:

  • The clients will have a large and complex state that will require something like a database to provide the data interaction that I need. Therefore (I think) cookies are out of the picture.
  • This data is transient, so the client won't care if it gets erased as soon as they close a session. However they will need to keep the data if they go to a different web page and then come back. Therefore (I think) somehow storing the data in some sort of a javascript SQL implementation will not work.
  • I can certainly do everything that I want to do on the server, and servers can scale to manage the load (Facebook). But (I think) I'd rather build a plugin than pay for the infrastructure to support this load. This is for a bare bones startup. (The richer the startup is, the barer my bones will be.)
like image 893
JnBrymn Avatar asked Jan 24 '11 02:01

JnBrymn


People also ask

What data storage options are available to browser client-side applications?

There are four main methods for storing large amounts of client-side data today: Web SQL, IndexedDB, Web Storage and Application Cache.

What is a client-side database?

Client-side databases are a way of doing complex queries against data without having to have a network connection or write a query algo for each specific case. They are also an excellent way of persisting data on the client for later use, and a central point for your application state.

What are different ways to store data in browser?

The 3 ways to store data in the browser are Cookies, Local Storage, and Session Storage. Depending on the needs any one of them is used to store data in the browser. In today's article, we will discuss an in-depth comparison between local storage, session storage, and cookies.


1 Answers

Indexed Database (Can I use)
Web SQL (Can I use)
localStorage

like image 64
Šime Vidas Avatar answered Sep 17 '22 14:09

Šime Vidas