473,396 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Get number of downloaded bytes

Hi all,

I have a page that's long (>400kb) and therefore takes several seconds to
download. I want to put either a progress bar or a simple counter that would
show how many percent of the page have been downloaded. Is there a property
or a method that returns how many bytes of the page have been downloaded at
a given time? Also how do I get the total size of the page in bytes? Thanks

-Oleg.
Jul 23 '05 #1
1 2326
Oleg Ogurok wrote:
Hi all,

I have a page that's long (>400kb) and therefore takes several seconds to
download. I want to put either a progress bar or a simple counter that would
show how many percent of the page have been downloaded. Is there a property
or a method that returns how many bytes of the page have been downloaded at
a given time? Also how do I get the total size of the page in bytes? Thanks

-Oleg.


Almost every GUI Web browser I've ever used already has a progress bar or
percentage display to show the amount of the page that has been downloaded.

You can not obtain the number of bytes that have been downloaded, nor can you
obtain the size of the page in a cross-browser way (at least not using
client-side JavaScript by itself). Internet Explorer has document.fileSize, but
that still leaves you with the problem of knowing how much of the document
you've currently downloaded at a given point in time.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

36
by: Dag | last post by:
Is there a python module that includes functions for working with prime numbers? I mainly need A function that returns the Nth prime number and that returns how many prime numbers are less than N,...
6
by: Herrcho | last post by:
in K&R Chapter 6.3 it mentions two methods to calculate NKEYS. and points out the first one which is to terminate the list of initializers with a null pointer, then loop along keytab until the...
1
by: Roy | last post by:
Hi, I have a problem that I have been working with for a while. I need to be able from server side (asp.net) to detect that the file i'm streaming down to the client is saved...
9
by: Martin Ho | last post by:
My application should check for new updates when user chooses this option in the menu. It should go online and check the flag and compare with current flag in the programs directory. If version is...
1
by: William Connery | last post by:
Hi, I have a small python program with e-mail capabilities that I have pieced together from code snippets found on the internet. The program uses the smtplib module to successfully send an...
9
by: salil123 | last post by:
How we can keep track of number of bytes downloaded at client side using PHP?. or user has canceled the downloading? so that downloaded bytes can be entered in database can you give me the...
0
by: salil123 | last post by:
Hi I want to know how we can keep track of number bytes downloaded at client side. I want to make a program that will keep track of number of bytes downloaded after downloading is completed....
4
by: salil123 | last post by:
Hi I want to know how we can keep track of number bytes downloaded at client side. I want to make a program that will keep track of number of bytes downloaded after downloading is completed....
2
dmjpro
by: dmjpro | last post by:
Here is my code import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.FileOutputStream; import java.net.InetAddress; import java.net.InetSocketAddress;...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.