Following worked on Ubuntu 12.04 using chromium and firefox browsers.

I ran following command on terminal for both firefox and chromium browser

HOME=/tmp/tmpdir firefox

Both browsers promptly created new directories in the given location where tracking cookies and cache files were installed. Even flash cookies were created in new directory.

I can create the script to create a new directory every time.

I am wondering if this technique can sufficient to defeat all or most of the tracking activities. Will browsers and plugins be able to sense the actual home directory and store data in actual directory? Are there any other problems for changing the HOME directory for browser session.

Can this technique also work on mac machines also? I understand because of registry settings this will not work on Windows as registry can not easily changed.

If its this simple then all I have do is create a shell script which can be double clicked to create a new browser session. Am I missing something else?

1 Answer 1


On Unix systems, the user home directory is associated with the user account and any application can "sense" it by using getpwent(). It so happens that there is a long-standing tradition, in Unix applications who want to learn the user's home directory (e.g. to read or create configuration files), to first look at the HOME environment variable and use its contents as home directory, if that variable is defined, falling back to getpwent() only if there is no such environment variable.

From your experiments, it seems that Firefox and Chromium honour that tradition.

However, plugins within the browsers may behave differently. If you want to avoid transporting state from one browsing session to the next, you may want to use the private browsing features of Firefox (it is called Incognito mode in the Chrome world). These features may be more thorough than simply moving the home directory around.

Be advised that "private browsing" or anything similar prevents tracking only in a loose sense -- cookie-based tracking is still feasible during a session, and cookie-less tracking is highly feasible too (see this demonstration).


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .