]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/assets/en/guide_local_storage.html
ae110a6b4a92227a8662a132afb0e2659a3351c5
[PrivacyBrowserAndroid.git] / app / src / main / assets / en / guide_local_storage.html
1 <!--
2   Copyright 2016 Soren Stoutner <soren@stoutner.com>.
3
4   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
5
6   Privacy Browser is free software: you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation, either version 3 of the License, or
9   (at your option) any later version.
10
11   Privacy Browser is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License for more details.
15
16   You should have received a copy of the GNU General Public License
17   along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
18
19 <html>
20 <head>
21 <style>
22     h3 {
23         color: 0D4781;
24     }
25 </style>
26 </head>
27
28 <body>
29 <h3>First-Party Cookies</h3>
30
31 <p>Cookies can be divided into two types.  First-party cookies are cookies set by the website in the URL bar at the top of the page.</p>
32
33 <p>From the early days of the internet, it became obvious that it would be advantageous for websites to be able to store
34     information on a computer for future access.  For example, a website that displays weather information could ask the
35     user for a zip code, and then store it in a cookie.  The next time the user visited the website, weather information
36     would automatically load for that zip code, without the user having to enter the zip code, and without the need for
37     the user to create an account on the website (which would be overkill for such a simple task).</p>
38
39 <p>Like everything else on the web, clever people figured out all types of ways to abuse cookies to do things that users
40     would not approve of if they knew they were happening.  For example, a website can set a cookie with a unique serial
41     number on a device.  Then, every time a user visits the website on that device, it can be linked to a unique profile
42     the server maintains for that serial number, even if the device connects from different IP addresses, as cell phones often do.</p>
43
44 <p>Some websites with logins require first-party cookies to be enabled for a user to stay logged in.  Cookies aren't the only only way
45     a website can maintain a user logged in as they move from page to page on the site, but if a particular website has chosen to
46     implement logins in that way, enabling first-party cookies on that site will be the only way to use the functionality.</p>
47
48 <p>If first-party cookies are enabled but JavaScript is disabled, the privacy icon will be yellow <img src="images/warning.png" height="16" width="16">
49     as a warning.</p>
50
51
52 <h3>Third-Party Cookies</h3>
53
54 <p>Third-party cookies are set by portions of a website that are loaded from servers different from the URL at the top of the page.
55     For example, most website that have advertisements load them from a third-party ad broker, like Google's
56     <a href="https://www.google.com/adsense/start/#?modal_active=none">Ad Sense</a>. Every time the website loads, it requests the ad
57     broker to display some ads.  The ad broker analyzes any information they may have about the user, looks at the current
58     rate advertisers are willing to pay for their ads, and selects those to display. The section of the website that displays
59     the ads is loaded from the third-party broker's server instead of the main server.</p>
60
61 <p>Because most of the advertisements on the internet are displayed from only a few brokers, it didn't take long for them to realize
62     that they could set a tracking cookie on the user's device and know every place that user goes. Every time an ad loads from a broker,
63     the first thing it does it check to see if if the device already has a unique serial number in a tracking cookie. If it does, it looks up
64     the profile for that serial number and makes a note of the new site. This is why a user can do a search on one website for a
65     product that they typically don't look for, like walnuts, and then suddenly start seeing advertisements for walnuts on every
66     website they visit.</p>
67
68 <p>In addition to ad brokers, social media sites discovered they could get in on the action. A few years ago, the major social media sites
69     like Facebook and Twitter convinced a large number of websites that it would be in there best interest to place little social media
70     icons on their pages. These are not just images. They contain <a href="https://developers.facebook.com/docs/plugins/like-button/">imbedded code</a> that
71     links back to the social media site, and, among other things, loads a third-party cookie on the device.  These cookies are placed even if the user does
72     not have an account with the social media platform. Over time, companies like Facebook (which also run an ad network) have built up quite a large number
73     of detailed profiles about people who have <a href="http://www.theverge.com/2016/5/27/11795248/facebook-ad-network-non-users-cookies-plug-ins">never even
74     created an account on their site</a>.</p>
75
76 <p>There is almost no good reason to ever enable third-party cookies.  On devices with Android KitKat or older (version <= 4.4.4 or API <= 20), WebView
77     does not <a href="https://developer.android.com/reference/android/webkit/CookieManager.html#acceptThirdPartyCookies(android.webkit.WebView)">differentiate
78     between first-party and third-party cookies</a>. Thus, enabling first-party cookies will also enable third-party cookies.</p>
79
80
81 <h3>DOM Storage</h3>
82
83 <p>Document Object Model storage, also known as web storage, is like cookies on steroids. Whereas the maximum combined storage size for all cookies from
84     a single URL is 4 kilobytes, DOM storage can hold between <a href="https://en.wikipedia.org/wiki/Web_storage#Storage_size">5-25 megabytes per site</a>.
85     Because DOM storage uses JavaScript to read and write data, enabling it will do nothing unless JavaScript is also enabled.</p>
86
87
88 <h3>Form Data</h3>
89
90 <p>Form data contains information typed into web forms, like user names, addresses, phone numbers, etc., and lists them in a drop-down box on future visits.
91     Unlike the other forms of local storage, form data is not sent to the web server without specific user interaction.</p>
92 </body>
93 </html>