?
Solved

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

Posted on 2014-10-30
4
Medium Priority
?
278 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 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn how to dynamically set the form action using jQuery.
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)
Suggested Courses

719 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