> I'm trying to write a small method, that gives me the LastModified Date
> of an URL. My program is working and returns sometimes this Date. But
[quoted text clipped - 5 lines]
> date and the browser can? Is there a possibility to get this date in
> another way and how does the browser access this information?
It's worth looking at exactly what the server is sending:
Find yourself a telnet program (or nc on some UNIX-like systems). telnet
to the web server with port 80. Once it has connected write an HTTP request:
HEAD / HTTP/1.1
Host: java.net
(You will need to press return a second time.) The first word is the
command. HEAD returns just the header information (sometimes). GET
returns the header and content. Next is the URL. I've just gone for the
root page. Then the protocol name.
The next line(s) are request headers. I've just set Host to the machine
I connected to. This is necessary for virtual web hosts.
Then a blank line indicates end of headers.
You should get a response something like:
HTTP/1.1 200 OK
Date: Sun, 04 Dec 2005 19:39:03 GMT
Server: Apache/1.3.33 (Unix) mod_perl/1.29
Vary: Host
Content-Type: text/html; charset=ISO-8859-1
X-Cache: MISS from www.java.net
Tom Hawtin

Signature
Unemployed English Java programmer
http://jroller.com/page/tackline/
Roedy Green - 04 Dec 2005 22:11 GMT
On Sun, 04 Dec 2005 19:52:26 +0000, Thomas Hawtin
<usenet@tackline.plus.com> wrote, quoted or indirectly quoted someone
who said :
>Find yourself a telnet program (or nc on some UNIX-like systems). telnet
>to the web server with port 80. Once it has connected write an HTTP request:
>
>HEAD / HTTP/1.1
>Host: java.net
the other way to do is with a packet sniffer. You snoop on what yore
browser sends and receives.
See http://mindprod.com/jgloss/sniffer.html
The advantage of the sniffer approach is your browser will fill in
other fields the server may demand, e.g. cookies, User-Agent etc.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.