Care for some Cookies? www.apwebco.com
Web Cookies (A.K.A.: Browser Cookies, HTTP cookies) Why do we need cookies? What is a cookie? How does a cookie look like? How does it work? Cookies, e-commerce and e-banking How do we control cookies? www.apwebco.com
Why Do We Need Cookies? WEB SERVER Ana John Peter browser browser browser HTTP HTTP  (Hypertext Transfer Protocol) HTTP www.apwebco.com Internet Browser and  Web Server communicate trough HTTP protocol which is  stateless Often we need to maintain state on the server-side (user identity, preferences, shopping cart, activity, etc) One method of maintaining state between HTTP requests is using  cookies
What Is a Web Cookie? Web Cookie: a small piece of text generated by the web server and sent to the browser Upon receiving the cookie, the browser: Stores the cookie in memory Sends the cookie back to the web server each time it requests a new web page www.apwebco.com
How Does a Cookie Look Like? A cookie is a name-value pair: cookie name = cookie value Examples: sessionID = AAA22311 languagePreference = EN headerColor = BLUE www.apwebco.com
How Does It work Consider a user that browses a news website Upon  first page request  (first visit), the web server issues a cookie (e.g.  sampleCookie=A1A211 ) The server sends the cookie and the page requested back to the browser The browser stores the cookie in memory and sends it back to the server with each  subsequent request The server inspects each request; if the cookie is present, the server is able to maintain state regarding the user (identity, preferences, activity etc) www.apwebco.com
How Does It work sampleCookie=A1A211 sampleCookie=A1A211 News page, please! News page, and COOKIE  sampleCookie=A1A211 Business page, please! ( sampleCookie=A1A211 ) Business page Sports page, please! ( sampleCookie=A1A211 ) Sports page browser WEB SERVER www.apwebco.com
Cookies and e-commerce Consider an e-commerce site that sells cosmetics and apparel Upon first request (visit) each online shopper (browser) receives a unique cookie. The server ties each cookie to an individual shopping cart (data structure) The server inspects each subsequent request, reads the cookie and updates the shopping cart associated with that cookie www.apwebco.com
Cookies and e-commerce Ana John Lipstick page, please! Lipstick page AND the cookie  SessionID=A1A211 SessionID=A1A211 COOKIE:  SessionID=A1A211 Socks page, please! Socks page AND the cookie  SessionID=BBB333 SessionID=BBB333 COOKIE:  SessionID=BBB333 Ana’s shopping cart John’s shopping cart browser browser WEB SERVER www.apwebco.com
Controlling Cookies www.apwebco.com
Happy Web Surfing! [email_address]

Web Cookies

  • 1.
    Care for someCookies? www.apwebco.com
  • 2.
    Web Cookies (A.K.A.:Browser Cookies, HTTP cookies) Why do we need cookies? What is a cookie? How does a cookie look like? How does it work? Cookies, e-commerce and e-banking How do we control cookies? www.apwebco.com
  • 3.
    Why Do WeNeed Cookies? WEB SERVER Ana John Peter browser browser browser HTTP HTTP (Hypertext Transfer Protocol) HTTP www.apwebco.com Internet Browser and Web Server communicate trough HTTP protocol which is stateless Often we need to maintain state on the server-side (user identity, preferences, shopping cart, activity, etc) One method of maintaining state between HTTP requests is using cookies
  • 4.
    What Is aWeb Cookie? Web Cookie: a small piece of text generated by the web server and sent to the browser Upon receiving the cookie, the browser: Stores the cookie in memory Sends the cookie back to the web server each time it requests a new web page www.apwebco.com
  • 5.
    How Does aCookie Look Like? A cookie is a name-value pair: cookie name = cookie value Examples: sessionID = AAA22311 languagePreference = EN headerColor = BLUE www.apwebco.com
  • 6.
    How Does Itwork Consider a user that browses a news website Upon first page request (first visit), the web server issues a cookie (e.g. sampleCookie=A1A211 ) The server sends the cookie and the page requested back to the browser The browser stores the cookie in memory and sends it back to the server with each subsequent request The server inspects each request; if the cookie is present, the server is able to maintain state regarding the user (identity, preferences, activity etc) www.apwebco.com
  • 7.
    How Does Itwork sampleCookie=A1A211 sampleCookie=A1A211 News page, please! News page, and COOKIE sampleCookie=A1A211 Business page, please! ( sampleCookie=A1A211 ) Business page Sports page, please! ( sampleCookie=A1A211 ) Sports page browser WEB SERVER www.apwebco.com
  • 8.
    Cookies and e-commerceConsider an e-commerce site that sells cosmetics and apparel Upon first request (visit) each online shopper (browser) receives a unique cookie. The server ties each cookie to an individual shopping cart (data structure) The server inspects each subsequent request, reads the cookie and updates the shopping cart associated with that cookie www.apwebco.com
  • 9.
    Cookies and e-commerceAna John Lipstick page, please! Lipstick page AND the cookie SessionID=A1A211 SessionID=A1A211 COOKIE: SessionID=A1A211 Socks page, please! Socks page AND the cookie SessionID=BBB333 SessionID=BBB333 COOKIE: SessionID=BBB333 Ana’s shopping cart John’s shopping cart browser browser WEB SERVER www.apwebco.com
  • 10.
  • 11.
    Happy Web Surfing![email_address]