Forum Moderators: DixonJones

Message Too Old, No Replies

What is a HEAD request?

         

RobBroekhuis

6:39 pm on Mar 18, 2004 (gmt 0)

10+ Year Member



From my log:

195.X18.110.203. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 Stumbl
Referred by http://(url deleted)
12:07:34:GET /seedbook.php (4441 bytes)
12:07:55:HEAD /seed-organizer.zip (0 bytes)
12:08:03:GET /seed-organizer.zip (32872 bytes)
12:09:04:GET /garden.php (5778 bytes)

I've never seen a HEAD request method before (only GET and POST). Other visitors get my zipfile directly with a GET request (it's simple an <a href="...zip"> link on one of my pages). Is it something new that Firebird browser does?
Rob

[edited by: DaveAtIFG at 10:21 pm (utc) on Mar. 18, 2004]
[edit reason] IP obscured [/edit]

worker

6:39 pm on Mar 18, 2004 (gmt 0)

10+ Year Member Top Contributors Of The Month



; )

peterdaly

6:46 pm on Mar 18, 2004 (gmt 0)

10+ Year Member



A HEAD request is usualy used by a browsers or proxy servers to see if it can use a cached version of something rather than pull the whole page.

I believe HEAD returns a last modified date as part of it's response. A HEAD request does not return the page, just information about the page. If a cached version cannot be used, the request is usually followed by a GET request for the same url.

py9jmas

6:56 pm on Mar 18, 2004 (gmt 0)

10+ Year Member



HEAD returns the same MIME headers as GET does - only without the content itself.

Useful information Firebird can get from HEAD includes the MIME type of what it's downloading and the file size. This information would be useful when it throws up a "save as..." dialog.

A quick test with Mozilla 1.6 (also Gecko based) is that it sends a HEAD request when I right click and select "save link target as". I expect that's what this user did, instead of just following the link.

Jon.

RobBroekhuis

9:58 pm on Mar 18, 2004 (gmt 0)

10+ Year Member



Thanks for the info. The number of bytes returned with the HEAD request was zero. Is this number of bytes recorded in the log file inclusive of MIME headers or exclusive? I'm just wondering if the HEAD request generated any useful response at all
Rob

larryn

10:29 pm on Mar 18, 2004 (gmt 0)

10+ Year Member



Rob,

As the Head Request just sends out a header, the size of the content is 0 bytes.

Larry