• Post Reply Bookmark Topic Watch Topic
  • New Topic

html file size  RSS feed

 
Kevin Li
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't download a static html file, how can I
get the html file's size.
 
Zakaria Haque
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kevin Li:
Don't download a static html file, how can I
get the html file's size.

use a HEAD request, rather than GET, and check the Content-Length header of the response
check out the following thread for similar code sample.
http://www.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=23&t=001788
Hope it helps.
[ March 28, 2002: Message edited by: zakaria haque ]
[ March 28, 2002: Message edited by: zakaria haque ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!