File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes how to find the size of web page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to find the size of web page" Watch "how to find the size of web page" New topic

how to find the size of web page

kishaloynag nag

Joined: Feb 16, 2005
Posts: 2
I am able to extract the textual content as well as the image within the
page using a html parser,but now how will i find the size of the extracted text,and image..........
Arto Pastinen
Ranch Hand

Joined: Dec 13, 2002
Posts: 79

Can you be little more specific?

g. Artsi
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
You'll need to download each image referenced (and CSS and JS and any other referenced object you want to count). Some of them may tell you the size of the object in bytes at the start of the response, allowing you to get just that and then close the connection.

To find the size of the root HTML itself, simply count the characters as you read them from the stream.

If this doesn't answer your question, please post a more detailed description and -- even better -- code.
I agree. Here's the link:
subject: how to find the size of web page
It's not a secret anymore!