State Management

Web Architecture [./]
Fall 2009 — INFO 290 (CCN 42593)

Erik Wilde, UC Berkeley School of Information
2009-11-10

Creative Commons License [http://creativecommons.org/licenses/by/3.0/]

This work is licensed under a CC
Attribution 3.0 Unported License
[http://creativecommons.org/licenses/by/3.0/]

Contents E. Wilde: State Management

Contents

E. Wilde: State Management

(2) 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.



Session

Outline (Session)

  1. Session [7]
  2. Cookies [4]
    1. Third-Party Cookie [2]
  3. Cookie-Less State Tracking [3]
  4. Conclusions [1]
Session E. Wilde: State Management

(4) HTTP and Sessions



Session E. Wilde: State Management

(5) Client-Side State



Session E. Wilde: State Management

(6) State in HTML or HTTP

State in HTML or HTTP

Session E. Wilde: State Management

(7) State in the Server Application

State in the Server Application

Session E. Wilde: State Management

(8) State as a Resource

State as a Resource

Session E. Wilde: State Management

(9) Stateless Shopping



Session E. Wilde: State Management

(10) Reusing Resources

Reusing Resources

Cookies

Outline (Cookies)

  1. Session [7]
  2. Cookies [4]
    1. Third-Party Cookie [2]
  3. Cookie-Less State Tracking [3]
  4. Conclusions [1]
Cookies E. Wilde: State Management

(12) Tracking Sessions



Cookies E. Wilde: State Management

(13) Cookies for State Management

Cookies for State Management

Third-Party Cookie

Outline (Third-Party Cookie)

  1. Session [7]
  2. Cookies [4]
    1. Third-Party Cookie [2]
  3. Cookie-Less State Tracking [3]
  4. Conclusions [1]
Third-Party Cookie E. Wilde: State Management

(15) Advertising & Privacy

  • Big ad servers are digital hubs in the commercial Web
    • consumers switch content providers but get the same ad provider
    • tracking consumers across content providers is very valuable
  • Cookies set by ad providers are sent very frequently
    • each site that uses the ad provider triggers the cookies to be sent
    • detailed profiling can be employed for creating consumer profiles
  • Content and ad providers can cooperate for better profiling
    • consumers log in to content providers are are reliably identified
    • their personal profile can be matched with the ad provider's profile
    • ad provider consolidation makes this scenario realistic


Third-Party Cookie E. Wilde: State Management

(16) 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

Cookie-Less State Tracking

Outline (Cookie-Less State Tracking)

  1. Session [7]
  2. Cookies [4]
    1. Third-Party Cookie [2]
  3. Cookie-Less State Tracking [3]
  4. Conclusions [1]
Cookie-Less State Tracking E. Wilde: State Management

(18) Cookie Support



Cookie-Less State Tracking E. Wilde: State Management

(19) URI Rewriting



Cookie-Less State Tracking E. Wilde: State Management

(20) Hidden Form Fields



Conclusions

Outline (Conclusions)

  1. Session [7]
  2. Cookies [4]
    1. Third-Party Cookie [2]
  3. Cookie-Less State Tracking [3]
  4. Conclusions [1]
Conclusions E. Wilde: State Management

(22) Session for Application State



2009-11-10 Web Architecture [./]
Fall 2009 — INFO 290 (CCN 42593)