Chris Pollett > Students >
Kukreti

    ( Print View )

    [Bio]

    [CS297/298 Blog]

    [CS297 Proposal]

    [Reading-The Internet Archive-PDF.]

    [Reading-Chapter 15 and 16 [Buttcher 10]-PDF.]

    [Reading-Chapter 13 [Buttcher 10]-PDF.]

    [Reading-Entity Tags-PDF.]

    [Deliverable 1]

    [Deliverable 2]

    [Deliverable 3]

    [Deliverable 4]

    [CS297 Report-PDF.]

    [CS298 Proposal]

    [CS298 Report-PDF]

    [CS298 Presentation-PDF]

    [CS298 Code]

    [Graduation Pic]

                          

























Deliverable 4

Description:

For deliverable 4, I experimented with the HTTP ETag
The ETag (Entity Tag) is a unique identifier for a resource and can be used to determine if a resource has changed over time. ETags are a part of HTTP can be used with ETag headers when making requests to a server. Following are the Headers used with ETags:

  • If-Match:Etag
    If the value ETag matches the ETag value of the resource, entire contents of the resource are returned. Otherwise, a response with code 412 (Precondition failed) is returned.
  • If-None-Match:Etag
    If the value ETag matches the ETag of the resource, it means that the resource hasn't changed. In that case, a response with code 304 (Not modified) is returned. Otherwise, entire contents of the resource are returned.

Code:

The following code consists of functions for downloading the contents of an HTML page, extracting ETag value if it exists, making a requests with an ETag value.

Output ScreenShot for URL:http://www.cs.sjsu.edu