Bytes received and bytes total of images via Javascript/jQuery
问题 I'm working on a Javascript/jQuery powered image preloader, and have hit a bit of a snag. While as of currently it provides the progress based on loaded_images / total_images , this is not very accurate given a page could have a thousand 1kB images, and a single 1MB image. I'm looking for a way to incorporate filesize into the progress calculations. Now, I've looked into some (cross browser compatible) tricks at capturing the filesize of a given image, and it seems that Ajax requests for