Gecko Preferences
Here are some notes on preferences you may want to change in Gecko Embedded (items specified in about:preferences
or about:config
page or preference files such ad prefs.js
)
Gecko Rendering Engine
Hardware Acceleration
- layers.acceleration.disabled
- Whether to disable HW Compopsiting (OpenGL OMTC)
- layers.acceleration.force-enabled
- if set to true, GPU will be used even if HW Compositing is determined to be unavailable
- gfx.canvas.azure.accelerated
- Whether to use Hardware Acceleration in Canvas
- widget.wayland-dmabuf-webgl.enabled
WebRender
Setting for WebRender rendering engine implemented in Rust language, enabled in Gecko 92 in all environments including Linux. Gecko 92 have a temporary setting to revert to the legacy rendering engine, but it was discontinued in Gecko 93, and WebRender (Software or Hardware) is now used across the board.
The results of the configuration changes can be checked at about:support
. Under Graphics section, Compositing: WebRender
means GPU-accelerated WebRender, and Compositing: WebRender (Software)
means fallback to software-processed WebRender. See also WEBRENDER
and WEBRENDER_QUALIFIED
in the decision log.
- gfx.webrender.all
- If true, all settings to enable WebRender are turned on (for cases where WebRender is automatically disabled but you want to enable it).
- On Linux, this includes forcing on the use of the OpenGL layer.
- Gecko 92 and later will enable WebRender without this setting. Basically, this setting is used up to Gecko 91.
- gfx.webrender.software (since Gecko 87)
- Use software WebRender instead of GPU in WebRender
- webrender.low-quality-pinch-zoom
- Perform pinch-zoom processing for low-performance devices such as Android devices, not for high-performance PCs.
- Consider enabling it for use on an embedded SoC if you want to have the same high-speed pinch-zoom processing as Android devices.
- gfx.webrender.debug.profiler
- If set to true, WebRender's Overlay Debugging function is enabled.
- gfx.webrender.debug.profiler-ui
- Specify a string that specifies what to display when Overlay Debugging is enabled. The default setting is
Default
, which displays very detailed information, but there are alsoCompact
andSlow indicators
for a simplified version, orFPS
if you simply want to display FPS. - See the comments in profiler.rs for other possible strings.
- Specify a string that specifies what to display when Overlay Debugging is enabled. The default setting is
Deprecated prefs not used in the latest Gecko:
- gfx.webrender.all.qualified (hidden prefs)
- Enable WebRender in environments known to be supported
- Set to false if you want to disable WebRender even though it is supposed to be supported.
- gfx.webrender.force-legacy-layers (deprecated on Gecko 93)
- setting to disable WebRender instead of gfx.webrender.force-disabled on Gecko 92
- gfx.webrender.force-disabled (deprecated on Gecko 92)
- If true, WebRender is not used (for cases where WebRender is enabled automatically, but you want to disable it)
- gfx.webrender.enabled (deprecated)
- If true, WebRender is used (for older versions that are disabled by default)
- on Linux, it is only enabled if layers.acceleration.force-enabled=true
- nglayout.debug.paint_flashing, nglayout.debug.invalidation
- settings for the old rendering engine do not work in WebRender
- Bugs that you want to implement in WebRender as well Paint flashing DevTools for WebRender
Some WebRender behaviors can only be controlled via environment variables, not prefs:
- MOZ_WEBRENDER=1
- Enable hardware-based WebRender. (except when gfx.webrender.software=true)
- Until Gecko 87 introduced fallback to software WebRender on runtime errors, setting this would always cause a hardware WebRender.
- See also Behavior change in Gecko 93
e10s/fission (multi-process) related
Preferences to enable/disable e10s and to configure the number of processes when enabled. You can check the result of the setting change in about:support, e.g. Multi-process window: 2/2 (enabled by user setting)
.
- browser.tabs.remote.autostart, browser.tabs.remote.autostart.2
- Basic settings for e10s enablement: set to true to enable on Gecko 60, set to false to disable on Gecko 68 or later for autostart and restart (or start with
MOZ_FORCE_DISABLE_E10S=1
as a runtime command line option).
- Basic settings for e10s enablement: set to true to enable on Gecko 60, set to false to disable on Gecko 68 or later for autostart and restart (or start with
- browser.tabs.remote.force-enable
- If true, ignore e10s disable by a11y feature. see: https://bugzilla.mozilla.org/show_bug.cgi?id=1198459
- browser.tabs.remote.force-disable
- force-disable e10s
- extensions.e10sBlocksEnabling, extensions.e10sBlockedByAddons
- If false, ignore e10s disabling by addons. see: https://bugzilla.mozilla.org/show_bug.cgi?id=1232274
- dom.ipc.processCount
- Number of processes when e10s is enabled. Note that too many processes will consume too much memory.
- See: Firefox's performance settings, Firefox uses too much memory or CPU resources - How to fix
- fission.autostart.
- fission enable iframe process isolation, which can be enabled experimentally starting with Gecko 69
RZ/G1 series can only create one EGL window due to hardware/BSP restrictions. So e10s have to be turned off since GPU acceleration with egl cannot coexist with canvas-gpu acceleration or WebGL, etc (not tested/confirmed).
Stylo
Enable/disable Stylo, the Rust implementation style engine ported from Servo. The result of the setting change will shown in Stylo
section of about:support page such as "Stylo: content = true (enabled by default), chrome = true (enabled by default)"
- layout.css.servo.enabled
- If set to true, use Stylo
WebGL/WebGPU
- webgl.msaa-force
- If true, WebGL anti-aliasing is used (disabled by auto-decision but should work)
- dom.webgpu.enabled (gecko 73~)
- If true, enable WebGPU.
Video Codecs
- media.mediasource.enabled
- Enable MSE
- media.mediasource.mp4.enabled
- Enable mp4 support in MSE
Touch events
- dom.w3c_touch_events.enabled
- Disabled (0), enabled (1), or auto-detect (2) for standard touch events; default is auto-detect (2)
- Gecko on RZ/G also defines an additional configuration position (3) for forced enable
- ref: Touch support in APZ on desktop platforms
security restrictions
- privacy.file_unique_origin
- Relax same-origin rule for local files. Fetch to non-HTTP(S) location no longer allowed since Firefox 68. Set to
false
if you want to work with content that does not work when loaded with a file URL for the time being.
- Relax same-origin rule for local files. Fetch to non-HTTP(S) location no longer allowed since Firefox 68. Set to
SpiderMonkey JS Engine
- javascript.options.baselinejit
- Enable/disable baseline JIT (no need to restart the browser itself)
- javascript.options.ion
- enable/disable IonMonkey optimized JIT (no need to restart the browser itself)
- When baseline JIT is disabled, this should also be disabled
- dom.max_script_run_time
- Specify the amount of time to wait before checking if the JavaScript of the content is too heavy to abort. It is recommended to set this in advance when running a heavy bench. Default 10 should be set to 1000, but in some cases it may be set to 0 (infinite).
Debugging
Show Frame rate
- layers.acceleration.draw-fps (deprecated)
- If true, the frame rate will be displayed in the upper left corner of the screen (but it may not be displayed in some cases)
- FPS history can be checked while profiling with Performance Tools in Development Tools
- This setting is not enabled in WebRender, see
gfx.webrender.debug.profiler
Show layer borders
- layers.draw-borders
- If true, composite layer borders will be displayed. if CSS Transition/Animation starts too late, check if the appropriate layer is detected, if not, set will-change to indicate it.
Remote debugging
- devtools.debugger.remote-enabled
- Set to true to allow remote debugging. The following items must also be set to true
- devtools.debugger.usb.enabled = true
- Set to true to allow bags remotely via USB
- devtools.debugger.prompt-connection
- set false to allow automatic connection without pressing allow button when connecting
History and Cache
Settings in Preferences window
You can configure settings for automatic deletion of cache and history data when exiting in about:preferences
- Open about:preferences
Privacy & Security
panel - `Cookies and Site Data- Turn on `Delete cookies and site data when Firefox is closed
- This will automatically delete cookies, local storage, and other data stored by content-side code.
Privacy & Security
panel -History
.- Select
Firefox will Use custom settings for History
, turn onClear history when Firefox closes
, and select the desired settings inSettings
. - This will automatically clear the history and cache stored by the browser engine, regardless of the program on the content side.
- Select
Reference: How to clear the Firefox cache
Disk/Memory Cache
browser.cache.disk.enable
- If set to
false
, disk cache (e.g. file cache) can be disabled.
- If set to
browser.cache.memory.enable
- If set to
false
, memory cache (e.g. image decoding cache) can be disabled.
- If set to
browser.cache.memory.capacity
-1
(default) automatically sets the capacity,0
disables it, and a positive integer value uses the specified KB of memory.
Others
- dom.max_script_run_time
- Set the time it takes to display an unresponsive script warning on heavy JavaScript processing pages.
- browser.sessionstore.interval
- Automatic storage of session information. Default 15 seconds (15000), but longer interval reduces disk access.
- browser.sessionstore.resume_from_crash
- If set to false, it is possible to disable the automatic storage of session information itself
- dom.push.enabled
- ESR 68 sets this to false by default and it will show
JavaScript error: resource:///modules/sessionstore/SessionStore.jsm, line 1215: uncaught exception: [2147746065](http://james-ross.co.uk/mozilla/misc/nserror?2147746065)
error. This is a known bug. To work around this problem for now, change the setting todom.push.enabled=true
.
- ESR 68 sets this to false by default and it will show