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