I want to take size in bytes of image in page at the first load page, and then create a loading bar and show it loading similar preloader of flash. But I don't know if jQuery can take size in bytes of image or not.
A:
I think all of these answers require something server-side to determine the file-size (please correct me if I'm wrong), but it would probably be best to preload the size from server-size or do an AJAX request to determine the file-size, but the latter seems counter productive.
Kerry
2010-06-23 02:46:10
Wouldn't be hard to put it in a manifest-style entry that had the image sizes. Not quite sure how you'd do a preloader style thing though. Finding the status of the downloading image is the hard part.
Xorlev
2010-06-23 03:12:20
A:
check this http://stackoverflow.com/questions/623172/how-to-get-image-size-height-width-using-javascript
Space Cracker
2010-06-23 10:22:51