6/10/2015cookies1 what are cookies? 6/10/2015cookies2 how did they do that?
Post on 19-Dec-2015
213 views
TRANSCRIPT
04/18/23 Cookies 3
Sites that know you... Just a few common examples:
my.yahoo.com www.amazon.com
Each time I return to these sites, they remember who I am. Yahoo remembers my news, bookmarks, etc. Amazon.com remembers what books I have
browsed and makes recommendations. How do they do that?
04/18/23 Cookies 4
What is a Cookie? Small piece of data generated by a web
server, stored on the client’s hard drive.
Controversial, as it enables web sites to track web users and their habits (more later…)
04/18/23 Cookies 5
Tracking Unique Visitors Step 1: Person A requests home page for
amazon.com Step 2: amazon.com Web Server generates a
new unique ID. Step 3: Server returns home page plus a
cookie set to the unique ID. Step 4: Each time Person A returns to
amazon.com, the browser automatically sends the cookie along with web page requested.
04/18/23 Cookies 6
Cookie Conversation
Browser Server
Give me the home page!
Here’s the home page plusa cookie.
Now, give me the news page(cookie is sent automatically)
I’ve seen you before… Here’sthe news page.
04/18/23 Cookies 7
Cookie Notes Created in 1994 for Netscape 1.1 Cookies cannot be larger than 4K No domain (netscape.com, microsoft.com)
can have more than 20 cookies. Cookies stay on your machine until:
they automatically expire they are explicitly deleted
Cookies work the same on all browsers. No cross-browser problems here!
04/18/23 Cookies 8
Magical Cookies The term cookie comes from an old
programming hack, called Magical Cookies.
If a programmer couldn’t make two parts of a program communicate, she would create a “magical cookie”, a small text file containing data to transfer between program parts.
04/18/23 Cookies 9
Why use Cookies? Tracking unique visitors Creating personalized web sites Shopping Carts Tracking users across your site:
e.g. do users that visit your sports news page also visit your sports store?
04/18/23 Cookies 11
Cookie Anatomy Version 0 specifies six cookie parts:
Name Domain Path Expires Secure
04/18/23 Cookies 13
In Netscape 4.0 and above Netscape provides several cookie options
Accept all cookies Accept only cookies that get sent back to
the originating server (used to block third party ads)
Disable cookies Warn me before accepting a cookie.
Menu Tab: Edit -> Preferences -> Advanced
04/18/23 Cookies 15
In Internet Explorer Provides several options:
Prompt before accepting cookies Disable all cookie use Always accept cookies
IE 5.0: Menu: Tools -> Internet Options -> Security ->
Custom Level
04/18/23 Cookies 17
Netscape Cookie Files Netscape stores all cookies within a cookies.txt file. Columns:
Domain name HTTP Header:
TRUE: cookie was set by an HTTP header FALSE: cookie was set by JavaScript
Path Secure Name Value
Let’s take a look...
04/18/23 Cookies 18
IE Cookie Files Cookie files are stored within a cookies
directory under windows: C:\windows\cookies
Each cookie gets its own name. Let’s take a look...
04/18/23 Cookies 19
Cookie Block Software Cookie Central has pointers to lots of
cookie blocking software. Cookie Pal Cookie Crusher Cookie Cruncher etc.