[thelist] Page load progress indicator

VOLKAN ÖZÇELİK volkan.ozcelik at gmail.com
Wed May 4 08:57:24 CDT 2005

> I have done such a thing. When the page was called I displayed the progress
> bar, using for the bar itself a div with a background colour. I then used
> setInterval to increase the width of the div by a percentage over time. The
> onload event handler then turned the whole thing off.

Is the progress indicator just for images, or for the javascript, css
and all that stuff that an http connection is established. You can
find several preloader-progress indicator variants for the former one.
The latter is rather difficult to achieve.

For js, the latter can be done by declaring globals in js files such
as g_myfile_loaded and checking typeOf(g_myfile_loaded).

I'm not sure whether it is possible to track if the html page itself
or a css loads or not, but it's not a big issue since they are small
and load in a fraction of a second (generally).

If you have builtin objects, such as flash, java applets, activex etc,
things get even more complicated.

So your question depends on how general you want to implement the progress bar.

And personally, I won't bother implementing a progress bar. I'd rather
try to keep my page weight small by adhering 8 to 12 seconds in 56K
connection rule of thumb. (this adds up to around 80 KBytes of code
for the page including everthing; the page body, js'es, css etc)


More information about the thelist mailing list