1

I have a page with ALOT of content which takes about a minute to load. I don't want content to appear until it is all loaded, so I make the containing div hidden, and then onload I make it visible:

$(document).ready(function(){
   $('div').css('visibility','visible');
}

Is there a way I can determine the progress of the loading (ie 50% loaded, 70% loaded) that way I can make a progress bar. To be clear, I can make a progress bar on my own. The question here is instead of only knowing when the page is 100% ready to make the div visible, can I know its continous progress so that I can relay that to the user while they wait?

danielb
  • 878
  • 4
  • 10
  • 26
  • Yes and no. http://stackoverflow.com/questions/3717793/javascript-file-upload-size-validation You didn't specify the type of content, so it's hard to say. If that doesn't help you, with JS alone i don't think you can. Closest thing is (if you have a number of files) to count the files and calculate each file as a fixed percentage - won't reflect accurately. The other thing is trough a server side language. – Radu Andrei Sep 18 '14 at 23:16
  • Yeah, take a look at this for a rundown with php https://www.youtube.com/watch?v=53b9Zop50R8 May not be the answer you're looking for but perhaps it will point you in the right way. – Radu Andrei Sep 18 '14 at 23:23
  • If possible , can post `html` , `css` , `js` ? Thanks – guest271314 Sep 18 '14 at 23:40

0 Answers0