667spring06

Conditional Get
a) Conditional GET (explain what it is for, how they are used – show at least 2 examples of HTTP headers, and the difference between 2 mechanism [validation & expiration]. Also explain which mechanism you implemented and tested in your server) (16 points) Conditional get (validation) involves the Last-Modified response header, and the If-Modified-Since request header.    1) the *server* responds to a request with the Last-Modified date of the file 2) the browser sends an 'if-modified-since' header with that same date on it's next request (refresh) 3) the server decides if the file is newer than the date sent. 3a) if yes : sends back the whole file (200 OK) 3b)  if no  : sends back a 304 NOT MODIFIED

Expiration 1) the server sends an 'Expires' header telling the browser when the file is no longer valid 2) on subsequent requests, the browser checks the exipres date of the file and -- a) if the date has passed it requests a new copy of the page/image -- b) if not, the browser does not send a request

We implemented Validation in our server. We actually send both the Last-Modified and the Expires headers, but we leave Expires blank.

b) When supporting "Caching mechanism", validation is very importinat. Why? And what are two primary categories to support the validation and related HTTP headers? It is very important because we need to ensure that the page requested is actually newer or has been modified.  The two primary categores are time based exipration (date) and size (length=) from the "Last-Modified: 2006-06-03 7:30PM; length=1020"