COOKIES How can apps maintain user state? Cookies! small bits of - - PowerPoint PPT Presentation

cookies how can apps maintain user state cookies
SMART_READER_LITE
LIVE PREVIEW

COOKIES How can apps maintain user state? Cookies! small bits of - - PowerPoint PPT Presentation

CS 498RK FALL 2017 COOKIES How can apps maintain user state? Cookies! small bits of data downloaded to your computer so that a site can remember you and what you did on subsequent visits Browser Server first request http:/


slide-1
SLIDE 1

FALL 2017 CS 498RK

COOKIES

slide-2
SLIDE 2

How can apps maintain user state?

slide-3
SLIDE 3

Cookies!

small bits of data downloaded to your computer so that a site can “remember” you and what you did on subsequent visits

slide-4
SLIDE 4

Server Browser

http:/ /www.example.org

first request response + request +

slide-5
SLIDE 5

uniquely assigned to you and your computer can be read only by a Web server in the domain that issued the cookie to you new browser, different computer, delete cookies? 1st time user

HOW THEY WORK

slide-6
SLIDE 6

cookies are bits of text not sofuware cannot read information, run programs, or install sofuware

ARE THEY SAFE?

slide-7
SLIDE 7

Most browsers are set to accept cookies automatically Modify browser settings to block cookies or ask for approval Blocking cookies can interfere with site usability

but what if I don’t like cookies…

slide-8
SLIDE 8

Uses

slide-9
SLIDE 9

SESSION MANAGEMENT

Remember a user as they navigate through site Unique session identifier sent to the server Site database stores user’s personal information Used to remember an authenticated user

slide-10
SLIDE 10

PERSONALIZATION

experience for visitors who previously browsed shoes experience for visitors in cold weather locations

https://www.optimizely.com/products/personalization/

slide-11
SLIDE 11

TRACKING

Track user behavior on site what they do, how ofuen they come back, etc. build up server logs for each user

V I S I T

slide-12
SLIDE 12

Types

slide-13
SLIDE 13

SESSION COOKIES

exists only in temporary memory while the user navigates the website deleted when user closes the browser (no expiration date)

slide-14
SLIDE 14

PERSISTENT COOKIES

transmitted to the server every time the user visits the website that it belongs to

  • r every time the user views a resource belonging to

that website from another website (tracking) expires at a specific date or afuer a specific length of time

slide-15
SLIDE 15

THIRD-PARTY COOKIES

Set when retrieving components on a web page that are stored on servers in other domains Allows advertising companies to track users across multiple sites

slide-16
SLIDE 16

WEB BEACONS

web bug, tracking bug, page tag, tag implemented through embedded image: tracking pixel, pixel tag, 1x1 gif, clear gif phones home (usually used with cookies)

slide-17
SLIDE 17

Implementation

slide-18
SLIDE 18

GET /index.html HTTP/1.1 Host: www.example.org …

https://en.wikipedia.org/wiki/HTTP_cookie

Client’s First Request to a Site

slide-19
SLIDE 19

HTTP/1.0 200 OK Content-type: text/html Set-Cookie: theme=light Set-Cookie: sessionToken=abc123; Expires=Wed, 09 Jun 2021 10:18:14 GMT …

https://en.wikipedia.org/wiki/HTTP_cookie

Server Response

Session Cookie Persistent Cookie

slide-20
SLIDE 20

GET /spec.html HTTP/1.1 Host: www.example.org Cookie: theme=light; sessionToken=abc123 …

https://en.wikipedia.org/wiki/HTTP_cookie

Client Request to Another Page On Site

slide-21
SLIDE 21

how do you feel about cookies?

slide-22
SLIDE 22

CLIFFHANGER

Security concerns…

V I S I T

slide-23
SLIDE 23

NEXT CLASS: PASSPORT LAB

courses.engr.illinois.edu/cs498rk1/