Forum Moderators: open
That is no easy thing to do in software in general, never mind on a webpage! On desktop applications the progress bar is never fully accurate - the system is constantly recalculating and reestimating the time left. It is judged on the number of files to process, so if the first of 20 takes 1 second to process then the system estimates 19 seconds remaining. However, the second file may take a minute to process so this throws everything out! That is why you can see readjustments and progress hanging at 99% for a while!
On a webpage the browser knows what files to bring in, but not their filesize. Also, network traffic can affect the time.
However, browsers have their own progress bar in the status bar - why duplicate this functionality?
What content are you trying to load that requires the user to see how far along it is?