h3 {
color: 0D4781;
}
+
+ img {
+ vertical-align: bottom;
+ height: 32;
+ width: 32;
+ }
</style>
</head>
<body>
-<h3>Erstanbieter-Cookies</h3>
+<h3><img src="images/cookie_dark_blue.png">Erstanbieter-Cookies</h3>
<p>Cookies können in zwei Typen unterteilt werden. Erstanbieter-Cookies sind Cookies, die von aktuell besuchten Website gesetzt werden.</p>
als Warnung.</p>
-<h3>Drittanbieter-Cookies</h3>
+<h3><img src="images/cookie_dark_blue.png">Drittanbieter-Cookies</h3>
<p>Drittanbieter-Cookies werden von Teilen einer Website gesetzt, die von einem anderen Server als dem aktuell besuchten.
Beispielsweise laden viele Websites Werbungen von einem Drittanbieter-Broker wie Googles
Deshalb aktiviert das Aktivieren von Erstanbieter-Cookies zugleich auch Drittanbieter-Cookies.</p>
-<h3>DOM-Speicher</h3>
+<h3><img src="images/ic_web_dark_blue.png">DOM-Speicher</h3>
<p>Der Document Object Model-Speicher, auch bekannt als Web-Speicher, ist wie Cookies auf Steroiden. Während die maximale Gesamtspeichergrße für alle Cookies von
einer einzigen URL 4kb beträgt, kann der DOM-Speicher zwischen <a href="https://en.wikipedia.org/wiki/Web_storage#Storage_size">5-25 Megabytes pro Seite</a> betragen.
Da der DOM-Speicher Javascript zum Lesen und Schreiben von Daten nutzt, ändert das Aktivieren also nichts, solange nicht auch Javascript aktiviert ist.</p>
-<h3>Formulardaten</h3>
+<h3><img src="images/ic_subtitles_dark_blue.png">Formulardaten</h3>
<p>Formulardaten beinhalten die Informationen, die in Web-Formularen eingegeben werden, wie Benutzernamen, Adressen, Telefonnummern etc. und listet sie als Auswahlmenü auf künftig besuchten Websites auf.
Ungleich der anderen Arten der lokalen Datenspeicherung werden Formulardaten nicht ohne die explizite Handlung des Nutzers an den Webserver gesendet.</p>
--- /dev/null
+../../en/images/cookie_dark_blue.png
\ No newline at end of file
--- /dev/null
+../../en/images/ic_subtitles_dark_blue.png
\ No newline at end of file
--- /dev/null
+../../en/images/ic_web_dark_blue.png
\ No newline at end of file
<html>
<head>
-<style>
- h3 {
- color: 0D4781;
- }
-</style>
+ <style>
+ h3 {
+ color: 0D4781;
+ }
+
+ img {
+ vertical-align: bottom;
+ height: 32;
+ width: 32;
+ }
+ </style>
</head>
<body>
-<h3>First-Party Cookies</h3>
+<h3><img src="images/cookie_dark_blue.png">First-Party Cookies</h3>
<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>
as a warning.</p>
-<h3>Third-Party Cookies</h3>
+<h3><img src="images/cookie_dark_blue.png">Third-Party Cookies</h3>
<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.
For example, most website that have advertisements load them from a third-party ad broker, like Google's
between first-party and third-party cookies</a>. Thus, enabling first-party cookies will also enable third-party cookies.</p>
-<h3>DOM Storage</h3>
+<h3><img src="images/ic_web_dark_blue.png">DOM Storage</h3>
<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
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>.
Because DOM storage uses JavaScript to read and write data, enabling it will do nothing unless JavaScript is also enabled.</p>
-<h3>Form Data</h3>
+<h3><img src="images/ic_subtitles_dark_blue.png">Form Data</h3>
<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.
Unlike the other forms of local storage, form data is not sent to the web server without specific user interaction.</p>
</head>
<body>
+<h3>Do Not Track</h3>
+
+<p>A few years ago the W3C (World Wide Web Consortium) created a mechanism for browsers to inform web servers that they would not like to be tracked.
+ This is accomplished by including a <a href="https://en.wikipedia.org/wiki/Do_Not_Track">DNT (Do Not Track) header</a> with web requests.
+ This header is enabled by default in Privacy Browser, although if desired it can be disabled in the settings.</p>
+
+<p>The DNT header doesn't really provide much privacy because most web servers ignore it. Yahoo programmed their servers to ignore the DNT header
+ from Internet Explorer 10 when it was turned on by default because they argued that the user had not made the decision to enable DNT.
+ Google and Microsoft ignore DNT even though they include a DNT feature in the browsers they distribute. Facebook also ignores DNT.</p>
+
+
<h3>Advertisements</h3>
<p>Privacy Browser Free includes a banner advertisement across the bottom of the screen that is populated by Google's
<p>Verizon, one of the major mobile carriers in the United States, adds a unique tracking header to all HTTP traffic on their network. The Electronic Frontier
Foundation has written about the <a href="https://www.eff.org/deeplinks/2014/11/verizon-x-uidh">privacy implications of this practice</a>. Due to public pressure
Verizon has created a way to <a href="http://www.clark.com/how-opt-out-verizons-super-cookie-tracking">opt out of this tracking</a>.</p>
-
</body>
</html>
\ No newline at end of file
// It is also used in `onCreate()`, `onCreateOptionsMenu()`, `onPrepareOptionsMenu()`, and `onOptionsItemSelected()`.
public static boolean firstPartyCookiesEnabled;
- // `thridPartyCookiesEnables` is public static so it can be accessed from `SettingsFragment`.
+ // `thirdPartyCookiesEnables` is public static so it can be accessed from `SettingsFragment`.
// It is also used in `onCreate()`, `onCreateOptionsMenu()`, `onPrepareOptionsMenu()`, and `onOptionsItemSelected()`.
public static boolean thirdPartyCookiesEnabled;
// `swipeToRefreshEnabled` is public static so it can be accessed from `SettingsFragment`. It is also used in `onCreate()`.
public static boolean swipeToRefreshEnabled;
- // `customHeader` is public static so it can be accessed from `BookmarksActivity`. It is also used in `onCreate()` and `loadUrlFromTextBox()`.
+ // `customHeader` is public static so it can be accessed from `BookmarksActivity`. It is also used in `onCreate()`, `onOptionsItemSelected()`, and `loadUrlFromTextBox()`.
public static Map<String, String> customHeaders = new HashMap<String, String>();
// drawerToggle creates the hamburger icon at the start of the AppBar.
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, supportAppBar, R.string.open_navigation, R.string.close_navigation);
- // Replace the header that `WebView` creates for `X-Requested-With` with a null value. The default value is the application ID (com.stoutner.privacybrowser.standard).
- customHeaders.put("X-Requested-With", "");
-
mainWebView.setWebViewClient(new WebViewClient() {
// shouldOverrideUrlLoading makes this `WebView` the default handler for URLs inside the app, so that links are not kicked out to other apps.
@Override
swipeToRefresh.setEnabled(swipeToRefreshEnabled);
+ // Replace the header that `WebView` creates for `X-Requested-With` with a null value. The default value is the application ID (com.stoutner.privacybrowser.standard).
+ customHeaders.put("X-Requested-With", "");
+
+ // Set Do Not Track. The default is true.
+ if (sharedPreferences.getBoolean("do_not_track", true)) {
+ customHeaders.put("DNT", "1");
+ }
+
+
// Get the intent information that started the app.
final Intent intent = getIntent();
// Clear `formattedUrlString`.
formattedUrlString = null;
+ // Clear `customHeaders`.
+ customHeaders.clear();
+
// Destroy the internal state of the webview.
mainWebView.destroy();
switch (key) {
case "javascript_enabled":
- // Set javaScriptEnabled to the new state. The default is false.
+ // Set `javaScriptEnabled` to the new state. The default is `false`.
MainWebViewActivity.javaScriptEnabled = sharedPreferences.getBoolean("javascript_enabled", false);
- // Toggle the state of the "dom_storage_enabled" preference. The default is false.
+ // Toggle the state of the `dom_storage_enabled` preference. The default is `false`.
final Preference domStorageEnabled = findPreference("dom_storage_enabled");
domStorageEnabled.setEnabled(sharedPreferences.getBoolean("javascript_enabled", false));
- // Update mainWebView and reload the website.
+ // Update `mainWebView`.
MainWebViewActivity.mainWebView.getSettings().setJavaScriptEnabled(MainWebViewActivity.javaScriptEnabled);
- MainWebViewActivity.mainWebView.reload();
// Update the privacy icons.
MainWebViewActivity.updatePrivacyIcons(MainWebViewActivity.privacyBrowserActivity);
break;
case "first_party_cookies_enabled":
- // Set firstPartyCookiesEnabled to the new state. The default is false.
+ // Set `firstPartyCookiesEnabled` to the new state. The default is `false`.
MainWebViewActivity.firstPartyCookiesEnabled = sharedPreferences.getBoolean("first_party_cookies_enabled", false);
- // Toggle the state of the "third_party_cookies_enabled" preference. The default is false.
+ // Toggle the state of the `third_party_cookies_enabled` preference. The default is `false`.
final Preference thirdPartyCookiesEnabled = findPreference("third_party_cookies_enabled");
thirdPartyCookiesEnabled.setEnabled(sharedPreferences.getBoolean("first_party_cookies_enabled", false));
- // Update mainWebView and reload the website.
+ // Update `mainWebView`.
MainWebViewActivity.cookieManager.setAcceptCookie(MainWebViewActivity.firstPartyCookiesEnabled);
- MainWebViewActivity.mainWebView.reload();
// Update the checkbox in the options menu.
MenuItem firstPartyCookiesMenuItem = MainWebViewActivity.mainMenu.findItem(R.id.toggleFirstPartyCookies);
break;
case "third_party_cookies_enabled":
- // Set thirdPartyCookiesEnabled to the new state. The default is false.
+ // Set `thirdPartyCookiesEnabled` to the new state. The default is `false`.
MainWebViewActivity.thirdPartyCookiesEnabled = sharedPreferences.getBoolean("third_party_cookies_enabled", false);
// Update the checkbox in the options menu.
MenuItem thirdPartyCookiesMenuItem = MainWebViewActivity.mainMenu.findItem(R.id.toggleThirdPartyCookies);
thirdPartyCookiesMenuItem.setChecked(MainWebViewActivity.thirdPartyCookiesEnabled);
- // Update mainWebView and reload the website if API >= 21.
+ // Update `mainWebView` if API >= 21.
if (Build.VERSION.SDK_INT >= 21) {
MainWebViewActivity.cookieManager.setAcceptThirdPartyCookies(MainWebViewActivity.mainWebView, MainWebViewActivity.thirdPartyCookiesEnabled);
- MainWebViewActivity.mainWebView.reload();
}
// Update the privacy icons.
break;
case "dom_storage_enabled":
- // Set domStorageEnabled to the new state. The default is false.
+ // Set `domStorageEnabled` to the new state. The default is `false`.
MainWebViewActivity.domStorageEnabled = sharedPreferences.getBoolean("dom_storage_enabled", false);
// Update the checkbox in the options menu.
MenuItem domStorageMenuItem = MainWebViewActivity.mainMenu.findItem(R.id.toggleDomStorage);
domStorageMenuItem.setChecked(MainWebViewActivity.domStorageEnabled);
- // Update mainWebView and reload the website.
+ // Update `mainWebView`.
MainWebViewActivity.mainWebView.getSettings().setDomStorageEnabled(MainWebViewActivity.domStorageEnabled);
- MainWebViewActivity.mainWebView.reload();
// Update the privacy icons.
MainWebViewActivity.updatePrivacyIcons(MainWebViewActivity.privacyBrowserActivity);
break;
case "save_form_data_enabled":
- // Set saveFormDataEnabled to the new state. The default is false.
+ // Set `saveFormDataEnabled` to the new state. The default is `false`.
MainWebViewActivity.saveFormDataEnabled = sharedPreferences.getBoolean("save_form_data_enabled", false);
// Update the checkbox in the options menu.
MenuItem saveFormDataMenuItem = MainWebViewActivity.mainMenu.findItem(R.id.toggleSaveFormData);
saveFormDataMenuItem.setChecked(MainWebViewActivity.saveFormDataEnabled);
- // Update mainWebView and reload the website.
+ // Update `mainWebView`.
MainWebViewActivity.mainWebView.getSettings().setSaveFormData(MainWebViewActivity.saveFormDataEnabled);
- MainWebViewActivity.mainWebView.reload();
// Update the privacy icons.
MainWebViewActivity.updatePrivacyIcons(MainWebViewActivity.privacyBrowserActivity);
switch (userAgentString) {
case "Default user agent":
- // Set the default user agent on mainWebView, display the user agent as the summary text for userAgentPreference, and disable customUserAgent.
+ // Set the default user agent on `mainWebView`, display the user agent as the summary text for `userAgentPreference`, and disable `customUserAgent`.
// Once API >= 17 we can use getDefaultUserAgent(). For now, setUserAgentString("") sets the WebView's default user agent.
MainWebViewActivity.mainWebView.getSettings().setUserAgentString("");
userAgentPreference.setSummary(MainWebViewActivity.mainWebView.getSettings().getUserAgentString());
break;
case "javascript_enabled_search_custom_url":
- // Set the new custom search URL as the summary text for "javascript_enabled_search_custom_url". The default is "".
+ // Set the new custom search URL as the summary text for `javascript_enabled_search_custom_url`. The default is ``.
javaScriptEnabledSearchCustomURLPreference.setSummary(sharedPreferences.getString("javascript_enabled_search_custom_url", ""));
- // Update javaScriptEnabledSearchCustomURL. The default is "".
+ // Update javaScriptEnabledSearchCustomURL. The default is ``.
MainWebViewActivity.javaScriptEnabledSearchURL = sharedPreferences.getString("javascript_enabled_search_custom_url", "");
break;
+ case "do_not_track":
+ // Update `customHeaders`. The default is `true`.
+ if (sharedPreferences.getBoolean("do_not_track", true)) {
+ MainWebViewActivity.customHeaders.put("DNT", "1");
+ } else { // Remove the Do Not Track header.
+ MainWebViewActivity.customHeaders.remove("DNT");
+ }
+
case "homepage":
- // Set the new homepage URL as the summary text for the Homepage preference. The default is "https://www.duckduckgo.com".
+ // Set the new homepage URL as the summary text for the Homepage preference. The default is `https://www.duckduckgo.com`.
homepagePreference.setSummary(sharedPreferences.getString("homepage", "https://www.duckduckgo.com"));
- // Update the homepage variable. The default is "https://www.duckduckgo.com".
+ // Update the homepage variable. The default is `https://www.duckduckgo.com`.
MainWebViewActivity.homepage = sharedPreferences.getString("homepage", "https://www.duckduckgo.com");
break;
<item>Custom user agent</item> <!-- This item must not be translated into other languages because it is referenced in code. It is never displayed on the screen. -->
</string-array>
<string name="custom_user_agent">Custom user agent</string>
+ <string name="do_not_track">Do not track</string>
+ <string name="do_not_track_summary">Send the Do Not Track header which politely suggests that web servers not track this browser.</string>
<string name="search">Search</string>
<string name="javascript_disabled_search">JavaScript-disabled search</string>
<string-array name="javascript_disabled_search_entries">
android:defaultValue="PrivacyBrowser/1.0"
android:inputType="textVisiblePassword|textMultiLine" />
+ <SwitchPreference
+ android:key="do_not_track"
+ android:title="@string/do_not_track"
+ android:summary="@string/do_not_track_summary"
+ android:defaultValue="true" />
+
</PreferenceCategory>
<PreferenceCategory