Ccna final exam - java, php, javascript, ios, cshap all in one. This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Friday, February 17, 2012
How to have jQuery get image size in bytes, not image dimensions?
I am using jQuery 1.7.1.
After an image loads in the browser window, I want to retrieve its total byte size. Is there an object name / value for that?
I don't think this is possible. You'll probably need a server-side language.
ReplyDeleteNo, there is no way you can get the image size using jQuery or pure JavaScript. The only way is to get it from server side using ajax.
ReplyDeleteYou can get the image url send it to a service or server side page and have to page or service return the image size.