State Management

Web Architecture (INFO 290-03)

Erik Wilde, UC Berkeley School of Information
2007-09-18
Creative Commons License

This work is licensed under a CC
Attribution 3.0 Unported License

Abstract

HTTP is a stateless protocol, where each request/response interaction is a separate interaction and there is no protocol support for longer sessions (such as a user logging in and working on a Web site as an identified user). State management refers to mechanisms which provide support for this kind of scenario, the most popular choice for state management are cookies. Another possibility is URI-based state management. This lecture is a first glimpse into the world of Representational State Transfer (REST), the Web's fundamental model of handling interaction with resources.

Outline (Session)

  1. Session [7]
  2. Cookie [4]
    1. Third-Party Cookie [2]
  3. Cookie-Less State Tracking [3]
  4. Conclusions [1]

HTTP and Sessions

Client-Side State

State in HTML or HTTP

State in HTML or HTTP

State in the Server Application

State in the Server Application

State as a Resource

State as a Resource

Stateless Shopping

Reusing Resources

Reusing Resources

Outline (Cookie)

  1. Session [7]
  2. Cookie [4]
    1. Third-Party Cookie [2]
  3. Cookie-Less State Tracking [3]
  4. Conclusions [1]

Tracking Sessions

Cookies for State Management

Cookies for State Management

Outline (Third-Party Cookie)

  1. Session [7]
  2. Cookie [4]
    1. Third-Party Cookie [2]
  3. Cookie-Less State Tracking [3]
  4. Conclusions [1]

Advertising & Privacy

Browsers Assemble Web Pages

Typical Web resources (HTML pages) are assembled from a number of resources retrieved by HTTP. Any resource not originating on the server that is hosting the HTML page is considered a third-party resource. If the HTTP response for such a resource contains a cookie, it is a third-party cookie.

Third Party Cookie

Outline (Cookie-Less State Tracking)

  1. Session [7]
  2. Cookie [4]
    1. Third-Party Cookie [2]
  3. Cookie-Less State Tracking [3]
  4. Conclusions [1]

Cookie Support

URI Rewriting

Hidden Form Fields

Outline (Conclusions)

  1. Session [7]
  2. Cookie [4]
    1. Third-Party Cookie [2]
  3. Cookie-Less State Tracking [3]
  4. Conclusions [1]

Session for Application State