If you do a HEAD request, the server will most likely return the file size and the file's last-modified time. You can also do a conditional GET, by providing a "If-Modified-Since" header. In both cases, see the spec for details.

$ GET -m HEAD 'http://www.adaelis.com/misc/temp/monks.jpg' 200 OK Connection: close Date: Thu, 30 Sep 2004 00:04:47 GMT Accept-Ranges: bytes ETag: "3cb18d-f292-411ee589" Server: Apache/1.3.31 (Unix) mod_fastcgi/2.4.2 Content-Length: 62098 <------- Content-Type: image/jpeg Last-Modified: Sun, 15 Aug 2004 04:24:41 GMT <------- Client-Date: Thu, 30 Sep 2004 00:04:47 GMT Client-Peer: 63.111.28.139:80 Client-Response-Num: 1

As for your second question, the minimum size required to get some basic info, why don't you take a peek into Image::Info's docs and guts?


In reply to Re: Getting JPEG details without downloading by ikegami
in thread Getting JPEG details without downloading by jasonjohn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.