Advanced Firefox configuration and tips This note was created on 2023-03-20 This note was last edited on 2023-07-27 === Wayland === Add the following variable to "~/.profile": ~~~ MOZ_ENABLE_WAYLAND=1 ~~~ === user.js === My "user.js": https://codeberg.org/pashynskykh/firefox-userjs In order to install, "user.js" should be placed in the root of Firefox profile (visit "about:profiles" to find location of your profile). === Hardware acceleration === 1. Install required driver(s): - for Intel: intel-media-va-driver-non-free - for Nvidia: mesa-va-drivers nvidia-vdpau-driver 2. Change the following settings in "about:config": ~~~ media.ffmpeg.vaapi.enabled:true media.ffvpx.enabled:false media.rdd-vpx.enabled:false media.navigator.mediadatadecoder_vpx_enabled:true ~~~ 3. To check, open any video on YouTube and execute the following command: # intel_gpu_top Note: "intel_gpu_top" is provided by "intel-gpu-tools" package. === Disable VP9 and AV1 codecs === This may be needed to enable hardware acceleration. ~~~ media.mediasource.vp9.enabled=false media.av1.enabled=false ~~~ === Disable AVIF to make images load faster on hardware w/o its support === ~~~ image.avif.enabled=false ~~~ === In-memory cache === 1. Clean all disk cache entirely. 2. Make the following changes in "about:config": ~~~ browser.cache.disk.enable:false browser.cache.disk.smart_size.enabled:false browser.cache.disk_cache_ssl:false browser.cache.offline.enable:false browser.cache.memory.enable:true browser.cache.memory.capacity:512000 browser.privatebrowsing.forceMediaMemoryCache:true ~~~ Note: The number 512000 is in kilobytes. 3. Restart Firefox. 4. Changes could be checked by visiting "about:cache". === Cleanup Firefox databases === $ find ~/.mozilla/firefox/ -type f -name "*.sqlite" -exec sqlite3 {} VACUUM \; === Disable theme sync === Set "services.sync.prefs.sync.extensions.activeThemeID" to "false". === Enable ECH and HTTP/3 === ~~~ network.dns.echconfig.enabled=true network.dns.http3.echconfig.enabled=true network.trr.mode=3 ~~~ Check: 1. https://www.cloudflare.com/ssl/encrypted-sni/ 2. https://cloudflare-quic.com/ If there will be issues with connection to some sites: ~~~ network.http.http3.version_negotiation.enabled=true ~~~ === Do not close window after closing last tab === Set "browser.tabs.closeWindowWithLastTab" to "false".