Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Learn More

Configure cookie handling in mozilla.cfg

  • 12 ответов
  • 1 имеет эту проблему
  • 428 просмотров
  • Последний ответ от jasonrw

more options

Hi,

I'm trying to manage Firefox on 75 Macs. I need cookies to be enabled, not cleared on Firefox shutdown with third party cookies accepted. Nothing I have tried in my mozilla.cfg file is working. Either one option is set or another, but not both. Here's my mozilla.cfg file:

// set Firefox Default homepage pref("browser.startup.homepage","https://www.google.com"); // disable default browser check pref("browser.shell.checkDefaultBrowser", false); // disable application updates pref("app.update.enabled", false) // disables the 'know your rights' button from displaying on first run pref("browser.rights.3.shown", true); // disables the request to send performance data from displaying pref("toolkit.telemetry.prompted", 2); pref("toolkit.telemetry.rejected", true); // enable cookies system-wide pref("network.cookie.cookieBehavior", 1); // do not clear cookies on shutdown // pref("privacy.clearOnShutdown.cookies", false); // accept third party cookies pref("network.cookie.thirdparty.sessionOnly", false);

What part of the above is wrong? OS is macOS 10.13.6 "High Sierra", Firefox is version 61.0.2 "Firefox Quantum."

The whole reason for this is to satisfy a cookie requirements for a site we regularly use.

Hi, I'm trying to manage Firefox on 75 Macs. I need cookies to be enabled, not cleared on Firefox shutdown with third party cookies accepted. Nothing I have tried in my mozilla.cfg file is working. Either one option is set or another, but not both. Here's my mozilla.cfg file: // set Firefox Default homepage pref("browser.startup.homepage","https://www.google.com"); // disable default browser check pref("browser.shell.checkDefaultBrowser", false); // disable application updates pref("app.update.enabled", false) // disables the 'know your rights' button from displaying on first run pref("browser.rights.3.shown", true); // disables the request to send performance data from displaying pref("toolkit.telemetry.prompted", 2); pref("toolkit.telemetry.rejected", true); // enable cookies system-wide pref("network.cookie.cookieBehavior", 1); // do not clear cookies on shutdown // pref("privacy.clearOnShutdown.cookies", false); // accept third party cookies pref("network.cookie.thirdparty.sessionOnly", false); What part of the above is wrong? OS is macOS 10.13.6 "High Sierra", Firefox is version 61.0.2 "Firefox Quantum." The whole reason for this is to satisfy a cookie requirements for a site we regularly use.

Все ответы (12)

more options

jasonrw said

I need cookies to be enabled, not cleared on Firefox shutdown with third party cookies accepted. ...
// enable cookies system-wide
pref("network.cookie.cookieBehavior", 1);
// do not clear cookies on shutdown
// pref("privacy.clearOnShutdown.cookies", false);
// accept third party cookies
pref("network.cookie.thirdparty.sessionOnly", false);

This seems to be the problem:

// enable cookies system-wide
pref("network.cookie.cookieBehavior", 1);

That value disables third party cookies. For relevant values, see:

more options

By the way, the default is to accept all cookies, so if Firefox in its default configuration is not working with the site, there probably is another reason.

more options

Note that you can use lockPref() instead of pref() if you want to prevent users from changing settings.

Is the mozilla.cfg working at all?

Is the file in the correct location?

Make sure the files are in the correct location. The JavaScript file that specifies using an autoconfig file needs to be in:

  • /Applications/Firefox.app/Contents/Resources/defaults/pref

The autoconfig.cfg (mozilla.cfg) file needs to be in:

  • /Applications/Firefox.app/Contents/Resources

See also:

more options

jscher2000 - Firefox was previously set through a default profile configuration to not save cookies and such between user sessions. That requirement has now changed. To do so, I'm introducing the use of a mozilla.cfg file.

cor-el - The files are in the right locations. The permissions seem to be right. The browser is loading the custom default home page w/o issue. Before, a typo kept Firefox from using the file and produced an error prompt. I've fixed the typo and that message no longer appears.

Thanks!

more options

All cookies would be:

pref("network.cookie.cookieBehavior", 0); // accept all cookies
pref("network.cookie.lifetimePolicy", 0); // accept always

pref("network.cookie.cookieBehavior",       0); // 0-Accept, 1-dontAcceptForeign, 2-dontAcceptAny, 3-limitForeign
pref("network.cookie.lifetimePolicy",       0); // 0-accept, 1-dontUse 2-acceptForSession, 3-acceptForNDays
more options

What I get with what I have set in mozilla.cfg. I don't have any locked prefs in my file, so I don't understand where the greyed-out settings come from.

permissions on the file

more options

Выбранное решение

more options

Hi jasonrw

If you are running 75 macs, then the folks over in Firefox for Enterprise should be able to help!

Changing this question to Firefox for Enterprise from "normal" Firefox

...Roland

more options

cor-el - I tried getting a policies.json file to work and could not. I'm not sure why. It just didn't work after following the instructions online.

Roland - Thanks for the move!

more options

Are you using permanent Private Browsing mode (Always use Private Browsing mode; Never Remember History)?

more options

Can you post the content of the policies file?

Is the policies.json file active if you check that on the about:support page (Help -> Troubleshooting Information)?

You can open the file in a Firefox tab to make the builtin JSON viewer parse the file.

more options

We were able to get the policies.json to work on macOS (Windows isn't an issue at this point). Not really sure what the clincher was. Out of the varied attempts to get it working. Attempt 'X' worked vs. all others. We were able to deploy the file with our content management system and the clients are getting the desired settings.