Arkenfox's user.js is designed to enhance privacy and security, and by default, it often includes settings that clear cookies when Firefox closes. This is a common privacy measure to prevent tracking across sessions[1][2][3].
To prevent Arkenfox from clearing session cookies, you need to modify certain preferences in your user-overrides.js file. This file is specifically for making changes to the default Arkenfox configuration without directly altering the main user.js, which makes updating Arkenfox easier.
Based on the search results, here are some relevant preferences and how you might set them in your user-overrides.js:
-
privacy.clearOnShutdown.cookies: This preference controls whether cookies are cleared when Firefox is shut down. Arkenfox often sets this to true by default. To keep cookies, you would set this to false[4].
user_pref("privacy.clearOnShutdown.cookies", false); // 2811
The number 2811 is likely a reference to the line number or section in the Arkenfox user.js wiki or file where this preference is discussed.
-
network.cookie.lifetimePolicy: This preference determines the lifespan of cookies. A value of 2 makes cookies session-only, meaning they are deleted when Firefox closes[5][6]. While some older information suggests changing this to 0 to make cookies persist, Arkenfox's approach and newer Firefox versions primarily use privacy.clearOnShutdown.cookies for controlling cookie persistence on exit[1][6]. Using network.cookie.lifetimePolicy might also break functionality on some sites[1]. Therefore, focusing on privacy.clearOnShutdown.cookies is generally recommended.
-
browser.sessionstore.privacy_level: This preference controls what session data is saved. A value of 2 disables storing extra session data, including form content and cookies[7][8]. While primarily related to session restore, it might interact with cookie behavior. If you are having trouble with cookies persisting, you could try adjusting this, though be aware of the privacy implications. The default value in Arkenfox is often 2[7][8].
Example of adding overrides to user-overrides.js:
You would add lines like the following to your user-overrides.js file:
// START: CUSTOM OVERRIDES
// Allow cookies to persist after closing Firefox
user_pref("privacy.clearOnShutdown.cookies", false); // Based on Arkenfox 2811
// END: CUSTOM OVERRIDES
Does Firefox Containers matter?
Yes, Firefox Multi-Account Containers can interact with how cookies are handled, and they are often recommended alongside privacy-focused configurations like Arkenfox[9][10][3].
Containers isolate website data, including cookies, local storage, and site preferences, to prevent cross-site tracking[9]. When you use containers, cookies are separated by the container they were created in[9]. This means that even if you configure Arkenfox to retain cookies on shutdown, cookies saved within one container will not be accessible by websites opened in a different container or in a standard tab.
Using containers allows you to keep cookies for specific sites where you need to stay logged in (e.g., email, social media) within their designated containers, while still benefiting from Arkenfox's privacy settings in other tabs or containers[3]. This provides a balance between privacy and usability.
In summary, to stop Arkenfox from forgetting session cookies, you primarily need to override the privacy.clearOnShutdown.cookies preference in your user-overrides.js. Firefox Containers are a separate but complementary privacy tool that can help you manage cookies and isolate site data, working well in conjunction with a hardened Firefox configuration.