Source code
Revision control
Copy as Markdown
Other Tools
#filter dumbComments emptyLines substitution
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// Non-static prefs that are specific to GeckoView belong in this file.
//
// Please indent all prefs defined within #ifdef/#ifndef conditions. This
// improves readability, particular for conditional blocks that exceed a single
// screen.
pref("accessibility.browsewithcaret_shortcut.enabled", false);
pref("accessibility.typeaheadfind", false);
pref("accessibility.typeaheadfind.flashBar", 1);
pref("accessibility.typeaheadfind.linksonly", false);
pref("accessibility.typeaheadfind.timeout", 5000);
#ifdef MOZ_UPDATER
pref("app.update.channel", "@MOZ_UPDATE_CHANNEL@");
#endif
pref("app.update.timerFirstInterval", 30000); // milliseconds
pref("app.update.timerMinimumDelay", 30); // seconds
pref("apz.axis_lock.breakout_angle", "0.5235988");
pref("apz.content_response_timeout", 600);
pref("apz.drag.enabled", false);
pref("apz.fling_curve_function_x1", "0.59");
pref("apz.fling_curve_function_x2", "0.05");
pref("apz.fling_curve_function_y1", "0.46");
pref("apz.fling_curve_function_y2", "1.00");
// :gordonb from UX said this value makes fling curving
pref("apz.fling_curve_threshold_inches_per_ms", "0.01");
pref("apz.fling_friction", "0.004");
pref("apz.fling_stopped_threshold", "0.0");
// :gordonb from UX said this value makes fling curving
pref("apz.max_velocity_inches_per_ms", "0.07");
pref("apz.second_tap_tolerance", "0.3");
pref("apz.touch_move_tolerance", "0.03");
pref("apz.touch_start_tolerance", "0.06");
// The breakpad report server to link to in about:crashes
pref("browser.chrome.toolbar_tips", false);
// True if you always want dump() to work
//
// On Android, you also need to do the following for the output
// to show up in logcat:
//
// $ adb shell stop
// $ adb shell setprop log.redirect-stdio true
// $ adb shell start
pref("browser.dom.window.dump.enabled", true);
pref("browser.download.folderList", 1);
pref("browser.download.manager.addToRecentDocs", true);
pref("browser.download.open_pdf_attachments_inline", true);
pref("browser.download.useDownloadDir", true);
// When enabled, Services.uriFixup.isDomainKnown('localhost') will return true
pref("browser.fixup.domainwhitelist.localhost", true);
// Open in tab preferences
pref("browser.link.open_newwindow", 3);
// Supported values:
// - 0: Force all new windows to tabs
// - 1: Don't force
// - 2: Only force those with no features set
pref("browser.link.open_newwindow.restriction", 0);
pref("browser.meta_refresh_when_inactive.disabled", true);
pref("browser.safebrowsing.downloads.enabled", false);
pref("browser.safebrowsing.features.cryptomining.update", true);
pref("browser.safebrowsing.features.fingerprinting.update", true);
pref("browser.safebrowsing.features.malware.update", true);
pref("browser.safebrowsing.features.phishing.update", true);
pref("browser.safebrowsing.features.trackingAnnotation.update", true);
pref("browser.safebrowsing.features.trackingProtection.update", true);
pref("browser.search.suggest.enabled", false);
pref("browser.search.update", false);
// Session history
pref("browser.sessionhistory.contentViewerTimeout", 360);
pref("browser.sessionhistory.max_entries", 50);
// Session store
pref("browser.sessionstore.interval", 10000); // milliseconds
pref("browser.sessionstore.max_resumed_crashes", 2);
pref("browser.sessionstore.max_tabs_undo", 10);
// Supported values:
// - 0: all
// - 1: unencrypted sites
// - 2: never
pref("browser.sessionstore.privacy_level", 0);
pref("browser.sessionstore.resume_from_crash", true);
// Enables the translations engine
pref("browser.translations.enable", true);
// Used for mocking data for GeckoView Translations tests, should use in addition with an automation check.
pref("browser.translations.geckoview.enableAllTestMocks", false);
// Used for mocking data for GeckoView WebCompat tests, should use in addition with an automation check.
pref("browser.webcompat.geckoview.enableAllTestMocks", false);
pref("browser.xul.error_pages.expert_bad_cert", false);
pref("chrome.override_package.global", "browser");
pref("chrome.override_package.mozapps", "browser");
pref("chrome.override_package.passwordmgr", "browser");
pref("devtools.console.stdout.chrome", true);
// Absolute path to the devtools unix domain socket file used
// to communicate with a usb cable via adb forward.
pref("devtools.debugger.unix-domain-socket", "@ANDROID_PACKAGE_NAME@/firefox-debugger-socket");
pref("dom.capture.enabled", true);
pref("dom.disable_open_during_load", true);
pref("dom.disable_window_move_resize", true);
// "graceful" process termination is misinterpreted as a process crash.
// To avoid this issue, we set dom.ipc.keepProcessesAlive.extension to 1.
// This stops Gecko from terminating the extension process. This also reduces
// the overhead of resuming a suspended (background) extension page.
// Note that this only covers "graceful" termination by Gecko.
// Android-triggered force-kills and OOM are not prevented and should still
pref("dom.ipc.keepProcessesAlive.extension", 1);
pref("dom.ipc.keepProcessesAlive.web", 1);
// This value is derived from the calculation:
// MOZ_ANDROID_CONTENT_SERVICE_COUNT - dom.ipc.processCount
pref("dom.ipc.processCount.webCOOP+COEP", 38);
// Disable the preallocated process on Android
pref("dom.ipc.processPrelaunch.enabled", false);
pref("dom.max_script_run_time", 20);
pref("dom.meta-viewport.enabled", true);
// The maximum number of recent message IDs to store for each push
pref("dom.push.maxRecentMessageIDsPerSubscription", 0);
// Allow service workers to open windows for a longer period after a notification
pref("dom.serviceWorkers.disable_open_click_delay", 5000);
pref("dom.webshare.enabled", true);
// Disable add-ons that are not installed by the user in all scopes by default (See the SCOPE
pref("extensions.autoDisableScopes", 15);
pref("extensions.enabledScopes", 5);
// If true, unprivileged extensions may use experimental APIs
pref("extensions.experiments.enabled", false);
pref("extensions.formautofill.addresses.capture.enabled", true);
pref("extensions.getAddons.browseAddons", "https://addons.mozilla.org/%LOCALE%/android/collections/4757633/mob/?page=1&collection_sort=-popularity");
pref("extensions.getAddons.cache.enabled", true);
pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/api/v4/addons/search/?guid=%IDS%&lang=%LOCALE%");
pref("extensions.getAddons.langpacks.url", "https://services.addons.mozilla.org/api/v4/addons/language-tools/?app=android&type=language&appversion=%VERSION%");
pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/android/search?q=%TERMS%&platform=%OS%&appver=%VERSION%");
// Don't let XPIProvider install distribution add-ons; we do our own thing on mobile
pref("extensions.installDistroAddons", false);
pref("extensions.langpacks.signatures.required", true);
// Enables some extra Extension System Logging (can reduce performance)
pref("extensions.logging.enabled", false);
// Whether MV3 restrictions for actions popup urls should be extended to MV2 extensions
// (only allowing same extension urls to be used as action popup urls)
pref("extensions.manifestV2.actionsPopupURLRestricted", true);
// Disables strict compatibility, making addons compatible-by-default
pref("extensions.strictCompatibility", false);
pref("extensions.systemAddon.update.enabled", true);
pref("extensions.systemAddon.update.url", "https://aus5.mozilla.org/update/3/SystemAddons/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml");
pref("extensions.update.background.url", "https://versioncheck-bg.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%");
pref("extensions.update.enabled", true);
pref("extensions.update.interval", 86400);
pref("extensions.webextOptionalPermissionPrompts", true);
// Start (proxy) extensions as soon as a network request is observed, instead
// of waiting until the first browser window has opened. This is needed because
// GeckoView can trigger requests without opening geckoview.xhtml.
pref("extensions.webextensions.early_background_wakeup_on_request", true);
pref("formhelper.autozoom", true);
pref("geckoview.console.enabled", false);
#ifdef NIGHTLY_BUILD
// Used for mocking data for GeckoView shopping tests, should use in addition with an automation check.
pref("geckoview.shopping.mock_test_response", false);
#endif
pref("image.cache.size", 1048576); // bytes
// Inherit locale from the OS, used for multi-locale builds
pref("intl.locale.requested", "");
pref("keyword.enabled", true);
pref("layout.accessiblecaret.always_tilt", true);
pref("layout.accessiblecaret.caret_shown_when_long_tapping_on_empty_content", true);
// Initial text selection on long-press is enhanced to provide
pref("layout.accessiblecaret.extend_selection_for_phone_number", true);
pref("layout.accessiblecaret.hapticfeedback", true);
pref("layout.accessiblecaret.height", "22.0");
pref("layout.accessiblecaret.margin-left", "-11.5");
pref("layout.accessiblecaret.width", "22.0");
// Update any visible carets for selection changes due to JS calls,
pref("layout.accessiblecaret.script_change_update_mode", 1);
pref("layout.css.report_errors", false);
pref("layout.spellcheckDefault", 0);
pref("media.eme.require-app-approval", true);
pref("media.geckoview.autoplay.request", true);
pref("media.gmp-gmpopenh264.autoupdate", false);
pref("media.gmp-gmpopenh264.enabled", true);
pref("media.gmp-gmpopenh264.visible", true);
pref("media.gmp-provider.enabled", true);
pref("media.mediadrm-widevinecdm.visible", true);
pref("media.navigator.permission.device", true);
// On mobile we throttle the download once the readahead_limit is hit
// if we're using a cellular connection, even if the download is slow,
pref("media.throttle-cellular-regardless-of-download-rate", true);
// Number of video frames we buffer while decoding video.
// On Android this is decided by a similar value which varies for
// each OMX decoder |OMX_PARAM_PORTDEFINITIONTYPE::nBufferCountMin|. This
// number must be less than the OMX equivalent or gecko will think it is
// chronically starved of video frames. All decoders seen so far have a value
pref("media.video-queue.default-size", 3);
// The maximum number of queued frames to send to the compositor.
// On Android, it needs to be throttled because SurfaceTexture contains only one
pref("media.video-queue.send-to-compositor-size", 1);
pref("network.buffer.cache.size", 16384);
pref("network.http.http2.default-hpack-buffer", 4096);
pref("network.http.http2.push-allowance", 32768);
pref("network.http.keep-alive.timeout", 109);
pref("network.http.max-persistent-connections-per-proxy", 20);
pref("network.protocol-handler.warn-external.mailto", false);
pref("network.protocol-handler.warn-external.tel", false);
pref("network.protocol-handler.warn-external.sms", false);
pref("network.protocol-handler.warn-external.vnd.youtube", false);
// Transmit UDP busy-work to the LAN when anticipating low latency
// network reads and on wifi to mitigate 802.11 Power Save Polling delays
pref("network.tickle-wifi.enabled", true);
pref("pdfjs.handleOctetStream", true);
pref("privacy.trackingprotection.pbmode.enabled", false);
pref("privacy.fingerprintingProtection.pbmode", true);
// Relay integration is not supported on mobile
pref("signon.firefoxRelay.feature", "not available");
pref("signon.showAutoCompleteFooter", true);
pref("toolkit.autocomplete.delegate", true);
// Locked because any other value would break GeckoView
pref("toolkit.defaultChromeURI", "chrome://geckoview/content/geckoview.xhtml", locked);
// Whether to use unified telemetry behavior; requires a restart to take effect
pref("toolkit.telemetry.unified", false);
pref("urlclassifier.downloadAllowTable", "");
pref("urlclassifier.downloadBlockTable", "");
pref("urlclassifier.malwareTable", "goog-harmful-proto,goog-unwanted-proto,moztest-harmful-simple,moztest-malware-simple,moztest-unwanted-simple");
pref("webextensions.storage.sync.kinto", true);
pref("xpinstall.signatures.required", true);
pref("xpinstall.whitelist.fileRequest", false);