In web applications we send a http request to web server and we get the response back. Our browser will render that response in browser and displays it. I want to calculate the number of embedded objects such as images,video,audio files,CSS etc in the response page.

I got the JavaScript code

document.write(document.images.length)

and using jQuery code

alert($("img").size());

But I want to calculate the number of embedded objects in a response HTML page using Java.

thank you.it is helpful.but i have doubt whether it give all the embedded objects present in a page.since page not only contains images,css,links but also some other media like video,any graphics files etc..so can i get those using this
–
user2049541Feb 7 '13 at 10:50