Built for Firefox configuration workflows · Free browser-based tools

Firefox lockPref vs defaultPref

Understand the difference between locked and default preferences.

Firefox AutoConfig offers functions that set or lock preferences. Understanding the difference helps avoid surprising behavior in managed installations.

lockPref

lockPref("browser.startup.page", 1); sets a preference and locks it against changes through the normal Firefox settings interface.

defaultPref

defaultPref("browser.startup.page", 1); changes the default value but normally allows users to override it.

pref

pref("browser.startup.page", 1); sets a user-level preference through AutoConfig. Its behavior differs from a locked preference.

Choose deliberately

Prefer default values when users should retain control. Reserve locked preferences for justified administrative requirements, and test the behavior against the Firefox version in use.

Reference: Firefox enterprise and AutoConfig documentation. Always verify settings against your installed Firefox release.