HTTP header info.

Post Reply
philip0
Posts: 7
Joined: Thu Apr 19, 2001 3:52 pm

HTTP header info.

Post by philip0 »

I am looking or a way to get the Last-Modified date from a web server without fetching the whole page.

I was thinking about doing something like this
<urlcp "maxpgsize" "10k">
<fetch http://website.com/somepage.html>
<urlinfo header "Last-Modified">

Does anyone have a better Idea ?
bart
Posts: 251
Joined: Wed Apr 26, 2000 12:42 am

HTTP header info.

Post by bart »

That'll probably do it. I don't think you need to get 10K though, 1 or 2 should do it.
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

HTTP header info.

Post by John »

Another option is to use <SUBMIT METHOD=HEAD> to just get the headers, and then find the Last-Modified. Depending on what you are doing you might find <urlcp ifmodsince> useful.
John Turnbull
Thunderstone Software
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

HTTP header info.

Post by Kai »

Also, the <SUBMIT METHOD=HEAD> method is faster and more polite; a short-maxpgsize <fetch> still has to get some content, and then abruptly close the connection, probably generating an error in the remote server's error log.
Post Reply