Did you read RFC2616 (HTTP/1.1 specification). This document included all
the information needed to create a HTTP/1.1 implementation. It's recommended
for new implementations to support HTTP/1.1.
HTTP/1.1 is backwards compatible with HTTP/1.0. Please see RFC2616 for more
You can get RFC2616 from http://www.ietf.org/.
Some information about the HTTP/1.1 caching mechanism:
Client request page.
Server send page and may send information like:
modified date (not relevant for cache),
pragma: no-cache (HTTP/1.0 do not cache document)
cache-control header (HTTP/1.1 caching mechanism)
expires header (HTTP/1.1 document expiration info)
Vary header (HTTP/1.1 dynamic content information)
Note that a client can make a request with:
* if-modified header
* ETag (???) header
These are added by the client to check for the latest available document
version. If the client has indeed the latest version, the server should
respond with: 304 Not Modified. Otherwise the server should return the
document (200 OK response).
You should definitly read RFC2616 for information about this.
I can't explain it in a short mail and I won't write a long one, since you
can find everything you could possibly need quite clear in the RFC.
Please take care you be compatible with the HTTP/1.0 caching mechanism. Also
ensure you support filtering the CRLF before the startline. This ensures
>From: Ajay [mailto:ajayb@...]
>Sent: Tuesday, 04 September 2001 11:32
>i m writing a small web server. i just want to know that when
>the client downloads something it should first check in the
>cache and if it is in the cache it should download from the
>cache . accroding to me to enable this u have to pass some
>headers which include last modified date .But when i pass the
>header like http/1.0 200 ok , after sending this i send the
>page . but it appears as junk char in the html page . can
>anyone tell me where i m going wrong