By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,453 Members | 3,183 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,453 IT Pros & Developers. It's quick & easy.

Get number of downloaded bytes

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.