Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2014-10-30
4
Medium Priority
?
298 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
  • 2
  • 2
4 Comments
 
LVL 84

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 84

Accepted Solution

by:
Dave Baldwin earned 1500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…
Suggested Courses

916 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