Solved

How to get size of web sql database by any static language

Posted on 2014-10-30
4
252 Views
Last Modified: 2014-11-16
Sir, I am using websql database in my website to store all data locally.

I want to get the size of whole websql database (size of all stored stored content) by any static language . eg javascript, jquery, angular js
0
Comment
Question by:BYTECHINDIA
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40412851
Support for that is very limited and they have stopped working on it.  http://en.wikipedia.org/wiki/Web_SQL_Database  This tutorial shows the database size being declared in every page: http://www.tutorialspoint.com/html5/html5_web_sql.htm  The Final Example page works in Safari, Chrome, and Opera but not in Firefox.

I did not see any way to get the size of the database.
0
 

Author Comment

by:BYTECHINDIA
ID: 40413390
Dear Sir,
Thanks for your attention
I searched a lot for same but no output

I am going to do this in the below way, need little guidance from you side

In any browser 1 character=1 byte. So for this first I'll count total no. of characters exists in first table , then from second , an so on and finally add them and can get the total size of content exist in complete web sql database.

Please suggest on the above mentioned method. This might be lengthy but work as good alternative.

Also provide me more simpler way to do this or integrate this.
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 40414174
That method can get you an approximation of the database size... except that it can not account for the overhead required to organize the data.
0
 

Author Comment

by:BYTECHINDIA
ID: 40418796
Ok Sir , Thanks

I have done this as above mentioned method as there is no other alternative

Thanks for your valuable advice
0

Featured Post

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The most up-to-date version of this article is on my Blog https://iconoun.com/blog/
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question