Customizing the way your browser stores and organizes data

Sweeping Up

Author(s): , Author(s):

Web browsers collect a large amount of data about the user’s browsing habits. If you care about privacy, you might want to clean up your browser and configure some custom privacy settings.

The web browser is one of the most popular desktop applications. Regardless of whether you prefer Firefox, Chrome, Opera, w3m, Internet Explorer, Safari, or another browser, you probably spend a lot of time on the Internet. To make life easier, modern web browsers (and web servers) collect information about us and our behavior. Thanks to this system of data storage and collection, we benefit from amenities such as automatic completion of URLs and access credentials, as well as predictive content buffering. But keeping all this browser data around also has some disadvantages – especially if you're concerned about privacy. This article offers some tips for cleaning up browser user data. The examples in this article use Firefox 57, but other browsers have similar features.

Basic Settings

To tweak Firefox settings, choose Edit | Settings. Alternatively, you could just type about:preferences in the address bar or click on the button with the three horizontal dashes in the upper right corner (Figure 1) and then select the gearwheel icon.

Figure 1: In Firefox 57, you can open the settings via the menu.

The Settings dialog window contains a selection menu with higher-level terms on the left and detailed information on the right. Many details are hidden in submenus and additional windows, making orientation difficult. For now, we will focus on the settings related to data protection (Figure 2). Choose Privacy & Security from the menu on the left side of the Preferences page, or enter about:preferences#privacy in the address bar.

Figure 2: Browser settings for privacy and security.

History and Activities

The settings in the Tracking Protection section let you block websites known to keep track of your activities. With the default settings, Firefox uses the basic version of the Disconnect block list [1]. Click the Change Block List button to adjust the filter rules. You can switch between the two modes: Basic protection and Higher protection. Mozilla recommends that you not block all trackers to allow websites to work as expected. You can exclude websites that you do not want to track you.

The History section lets you specify how Firefox will log the progress of the websites you visit. By default, Firefox automatically remembers your browsing history. For more privacy, change the setting to Never remember history, or choose Use custom settings for history for user control of the privacy settings (Figure 3).

Figure 3: In the History settings, you can also set the validity of cookies.

To see the history, press Ctrl+H or select Library | History (Figure 4). Press Delete to delete a recorded entry. Use the input field above to start a search for the specified term and quickly jump to the desired entry. To remove the entire history, choose Library | History | Clear Recent History.

Figure 4: Firefox displays the history of web pages opened in the browser in the sidebar or via the menu.

Removing Cookies

When you meet someone for coffee, the host will often offer you cookies. If you visit a website with your browser, it too will offer you a few cookies, in this case in the form of small text files saved locally by the browser.

The files you receive help the web page to identify you on your next visit by means of a stored session ID. For example, you don't have to register again, such as with a forum or a webmail. Other information, such as whether and how often you visit the site and which settings you use for surfing, also ends up in the browser's cookie jar.

Not all cookies taste good. For example, cookies can be used to inject malware into the browser, to sniff critical data, or to spy on your surfing behavior.

When you call up a website, you often receive what are known as third-party cookies in addition to cookies from the domain you actually accessed. For example, if you navigate to a travel agent's website, you will often find one of the typical Facebook like buttons next to the individual offers. This element, which is retrieved directly from the Facebook servers, now sets a Facebook cookie when the travel provider's website is loaded; the social media service can then read this cookie in order to present you with targeted advertising.

You can view the stored cookies by clicking the Show Cookies button (Figure 5) and removing them if necessary. Keep in mind that this restricts the functionality of many websites if you completely block cookies: For example, a typical online store or forum throws you out of the system every time you visit a page, so you would have to log in again and again.

Figure 5: There is hardly any current website that does not leave cookies in the user's browser.

Emptying the Browser Cache

The browser cache serves as a buffer for the Internet pages you visit. The browser stores resources such as page content and images in case you open the website later. For example, large-format images or recurring page elements such as stylesheets do not have to be reloaded from the web when a new page is created. This approach reduces the data volume and speeds up the page build-up.

However, the cache only fully leverages these advantages if it is static, and if the website has not been updated on the server in the meantime. Dynamic content changes every time it is called, which means cached data is always obsolete.

By default, Firefox automatically organizes the cache; the default size is 350MB (Figure 6). If necessary, you can disable automatic cache management and limit the cache size. Clicking on Clear Now causes Firefox to remove all traces from the hard disk. Alternatively, you can just delete the data from the past few hours in the menu using Library |History| Clear recent history.

Figure 6: The cache's size can be limited in the Firefox settings.

Deleting Form Data

Firefox remembers everything you type in input fields on the web, such as your name and email address when you subscribe to a newsletter or your address when you order from an online shop. If you are concerned about data privacy, you can delete this data in the menu under Library | History | Clear recent history. In the window that then appears (Figure 7), select the desired period of time, click Details, and check Form & Search History.

Figure 7: Deleting form data and other user-specific data in the History menu.

Blocking and Filtering

In order to reduce the risk of attacks via the web browser, it helps to suppress additional JavaScript code. Popular Firefox add-ons for suppressing scripts include NoScript [2] and uMatrix [3]. Ad blockers such as uBlock Origin [4] ensure that the browser only loads what you want it to load. Firefox also lets you surf in a private window (New private window), in which Firefox does not remember cookies or form data.

Another option is to lock the web browser into a secure environment, such as a virtual machine. At first glance, this approach might seem complicated, but it definitely slows down attackers, and it typically doesn't have a noticeable affect on performance given the capabilities of today's hardware. In Firefox 57, the browser now outsources many tasks to a sandbox that runs separately from the rest of the system [5], which reduces the importance of running the browser in a virtual machine.

Conclusions

Tidying up is often tedious, but it does get rid of the ballast. It is a good idea to clear out the browser cache once in a while; cookies and form data also belong in the virtual trash can. The same applies to the history and bookmarks – discard all entries that you no longer need.

The Author

Frank Hofmann works on the road, preferably in Berlin, Geneva, and Cape Town, as a developer, trainer, and author. He is coauthor of the Debian Package Management Book (http://www.dpmb.org/index.en.html).

Mandy Neumeyer works in tourism and has been living in South Africa for nine years. She is currently earning additional income as a digital nomad.