Forum Moderators: coopster
i've tested it on opera and ie
it's not the same as *.html files, cause while static html is cached, clicking on a link will load cached content, not request a new one
[edited by: jatar_k at 6:59 pm (utc) on Sep. 15, 2003]
[edit reason] delinked [/edit]
You may also want to look at the HTTP RFC which explains how the protocol works.
daisho.
page 2
HTTP/1.1 200 OK
Date: Tue, 16 Sep 2003 02:08:33 GMT
Content-Encoding: gzip
Transfer-Encoding: chunked
Server: GWS/2.1
Content-Type: text/html
Cache-control: private
ETag is useless for google, waste cpu time to calc it, low hit
Once set if the client has any type of cache for that object it will make the reqest sending you the ETag and/or If-Modified-Since headers.
On the server side analyse them. If you determine that the client has a current copy then simply send back "304 Not Modified" rather than a "200 OK" followed by the content. That way you tell the client that it's object is still fresh and do don't waste the time/bandwidth to send the page. The client will then display out of it's cache.
Again the HTTP RFC is a *GREAT* place to start. Read about the different possibilites and behaviours and then code to your hearts content.
daisho.
but there maybe a little mistake:
when a content has "last-modified", IE don't even request the server if user click on link in the 2nd time, unless user press f5 to refresh page
that's how IE handle *.html(with its headers)