Solved

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

Posted on 2014-10-30
4
201 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 82

Expert Comment

by:Dave Baldwin
Comment Utility
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
Comment Utility
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 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now