Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
197
rated 0 times [  200] [ 3]  / answers: 1 / hits: 19284  / 15 Years ago, thu, december 24, 2009, 12:00:00

I'm writing an iphone application and need to show a progress bar that shows the loading progress of a web page. I want to insert a JS function to this page and once I call it, it will give me the load progress (how much bytes have been loaded and the total size). Is this possible?



Thanks


More From » iphone

 Answers
30

No, it's not possible. You can emulate it by breaking up your page to small pieces and load it one by one with ajax requests but I don't think it is worth the trouble.



Another idea is to put little pieces of script like



<script>percentage += 10; updateProgressBar();</script>


through your page. That script will be executed the second browser loads (or parses) it so you will be able to estimate the progress.


[#97994] Monday, December 21, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kalias

Total Points: 79
Total Questions: 116
Total Answers: 116

Location: Malaysia
Member since Wed, May 11, 2022
2 Years ago
;