Skip to content
Search

Firefox

lastmod 2025-12-14created 2015-01-2276 edits

Mozilla Firefox is a free software web browser developed by the Mozilla Foundation and the Mozilla Corporation that runs on Windows, Linux, OS X, and Android. As of February 2014, it holds about 12%–22% of the worldwide web browser market and, depending on the region, is the second or third most used web browser. According to Mozilla, it has more than 450 million users worldwide. In particular, it is the most popular web browser in Indonesia, Iran, Germany, and Poland, with market shares of 55%, 46%, 43%, and 41% respectively.

It uses the Gecko layout engine to display web pages and implements web standards. It has tabbed browsing, spell checking, integrated search, live bookmarks, a download manager, and more. It also has an integrated search system that lets users use the search engine of their choice (Google is the default in most regions). (On Android, long-pressing the search bar lets you add a search engine yourself.)

Features can also be added through third-party add-ons.

Categories

Plugins

Ad blocking

Firefox forks

Installation

Ubuntu

echo "deb http://deb.debian.org/debian/ unstable main contrib non-free" >> /etc/apt/sources.list.d/debian.list
apt-get update
apt-get install -y --no-install-recommends firefox

Extended Support Release

Command Line Options

Shortcuts

Firefox keyboard shortcuts:

  • Ctrl+L: for the Location bar.
  • Ctrl+K: for the Search bar.

Do Not Track

Most websites track visitors' web usage information and sell or provide it to other companies. This information is used to show ads, products, and services targeted specifically at you. Firefox's "Do Not Track" feature asks websites to stop tracking.

When Do Not Track is on, Firefox asks every website you visit (including advertisers and other content providers) not to track you. Honoring this setting is the company's decision — individual websites are not required to honor it. Websites that honor this setting will automatically stop tracking your web usage information. Using Do Not Track does not affect your ability to log in to websites and does not make you lose personal information — such as shopping carts, location information, and login information.

설정 > 개인정보 > 웹 사이트에 방문자 추적 중지 요청

Or enter about:preferences in the URL bar.

Changing the User-Agent

In the general.useragent.override property in about:config, select String, click the "+" button, and enter the User-Agent you want.

Installing extensions (plugins)

Note that the -install-global-extension flag is no longer used [^0]

For latest versions of Firefox, the procedure has been simplified a lot!

  1. Unzip extension.xpi
  2. Read applications.gecko.id from manifest.json
  3. Rename extension.xpi to {ID}.xpi (the file name includes the braces ({, }))
  4. Copy to one of the standard installation folders listed here
unzip -p extension.xpi manifest.json | jq .applications.gecko.id | sed 's/"//g' | xargs -I {} cp -v extension.xpi "<profile_directory>/extensions/{}.xpi"

Fixing excessive memory usage

There are also extensions that block unnecessary content. For example,

There is also a #Task Manager (about:processes) page for managing processes yourself.

Task Manager

Accessible at the about:processes URL.

Firefox config

Detailed Firefox settings can be adjusted on the about:config page.

  • javascript.enabled: Turns JavaScript ON/OFF.
  • dom.event.contextmenu.enabled: Prevents mouse right-click events. That is, setting this to false lets you right-click on web pages that block right-clicking.
  • network.manage-offline-status: Turns ON/OFF the mode that manages the browser's OFFLINE and ONLINE states. If this mode is switched to false, querying window.navigator.onLine returns true even when the network interface is switched OFF.
  • network.online: Whether to fix the browser to the online state when it starts.
  • gfx.webrender.layer-compositor

Font settings

Fission

Site isolation is coming to Firefox under the name Fission (nuclear fission), making it relatively safer against attacks like Spectre. Using separate processes increases stability and improves responsiveness even when one page does a lot of work.

WebRTC Privacy

Settings related to WebRTC privacy.

media.peerconnection.ice.obfuscate_host_addresses
Host address obfuscation (?)

Prefs that control ICE Candidate generation

All of these can be set from about:config, or controlled via an extension

media.peerconnection.ice.force_interface - string (default "")
interface name to match for ICE (Firefox 43, uplifted to 42, requested for 41)
  • If set, and there is no interface that matches exactly, NO candidates will be generated
  • If set and there is a match, that interface will be used solely for ICE. Local (LAN) and external IP addresses for that interface will be used for ICE candidates. This can be pointed at a single external interface to hide/ignore internal (VM) interfaces, unconnected interfaces or VPNs (e.g. work VPNs). It can also be set to a VPN interface, and then ICE will only use the VPN (and if the VPN is down, ICE will fail).
media.peerconnection.ice.relay_only - boolean (default false)
only generate relay (TURN) candidates for ICE (Firefox 42)
  • This can be used to block all local (LAN) and external IP addresses from being generated as candidates.
  • An example use-case would be avoiding exposing your external IP address to a caller (such as when avoiding disclosing you're in town Xxxxx when having a call with someone you have a protection order against; roughly the equivalent of blocking outgoing caller-id on the PSTN bug *-whatever)
  • NOTE: does not hide your external IP address from the TURN server itself (see use_document_iceservers and default_iceservers to restrict to a TURN of your choice).
media.peerconnection.use_document_iceservers - boolean (default true)
use STUN/TURN servers provided by the page (all recent Firefox versions)
  • If set to false and media.peerconnection.default_iceservers is set to the server(s) you want to use, only those servers will be used, and no server provided by the page will be used.
  • This can be useful for corporate 'gateway' TURN servers, or for a TURN server hosted by a VPN provider.
media.peerconnection.ice.default_address_only - boolean (default false)
limit ICE candidates to the default interface only (Firefox 43, uplifted to 42)
  • The default interface used for general routing is identified and only that address is used for candidate generation
  • LAN IP addresses are not generated, the external IP address for that interface is (for a VPN, the exit portal of the VPN)
  • If your router does not support 'hairpinning', a within-LAN call will end up being routed through an external TURN server
media.peerconnection.ice.no_host - boolean (default false)
eliminate all local addresses from the candidates (Firefox 51)
media.peerconnection.enabled - boolean (default true)
enables/disabled ability to create RTCPeerConnection objects (all recent Firefox versions)

Trusted Recursive Resolver

Firefox provides an optional resolver mechanism using a dedicated DNS-over-HTTPS server.

DNS-over-HTTPS (DOH) allows DNS resolves with enhanced privacy, secure transfers and improved performance.

Setting DNS-over-HTTPS in Firefox

network.trr.uri
Enter the host server that supports DNS over HTTPS. Public server addresses are as follows.
network.trr.bootstrapAddress
Sets the DNS server used to get the IP address of the network.trr.uri set above. Reportedly, leaving it blank causes no problems in most cases. If it does not work properly, enter any working DNS address. For example, enter 8.8.8.8 for Google DNS or 1.1.1.1 for Cloudflare DNS.
network.trr.mode
Sets the operating mode. Use 3 or 2.
  • 0: Do not use DNS over HTTPS
  • 1: Run the conventional method and DNS over HTTPS at the same time and use whichever responds faster
  • 2: Try DNS over HTTPS first and fall back to the conventional method on failure
  • 3: Use DNS over HTTPS only
  • 4: Run both at the same time but use only the conventional method
network.security.esni.enabled
Applies Encrypted SNI.

The recommended values are as follows.

network.trr.uri: https://cloudflare-dns.com/dns-query
network.trr.bootstrapAddress: 1.1.1.1
network.trr.mode: 2
network.security.esni.enabled: true

Disable Image Loading

permissions.default.image: 2

Other settings

network.proxy.type
http://kb.mozillazine.org/Network.proxy.type
network.dns.disablePrefetch
http://kb.mozillazine.org/Network.dns.disablePrefetch

Docker container for Firefox

The GUI of the application is accessed through a modern web browser (no installation or configuration needed on the client side) or via any VNC client.

A VNC server is opened, and you connect through a Web Browser. Run it with the script below.

#!/usr/bin/env bash

HOMEPAGE=${1:-https://google.com}
HOST_PORT=${2:-5800}
DOWNLOAD_DIR=$HOME/Downloads

echo "Run Firefox Web"
echo "Homepage: $HOMEPAGE"
echo "Download directory: $DOWNLOAD_DIR"
echo "Access URL: http://localhost:$HOST_PORT"

if [[ ! -d "$CONFIG_DIR" ]]; then
    mkdir -p "$CONFIG_DIR"
fi

docker run --rm -it \
    --security-opt seccomp=unconfined \
    --shm-size 2g \
    -p $HOST_PORT:5800 \
    -v "$DOWNLOAD_DIR:/config/downloads:rw" \
    -e "FF_PREF_HOMEPAGE=browser.startup.homepage=\"$HOMEPAGE\"" \
    -e "FF_PREF_TRR_URI=network.trr.uri=\"https://cloudflare-dns.com/dns-query\"" \
    -e "FF_PREF_TRR_BOOTSTRAP=network.trr.bootstrapAddress=\"1.1.1.1\"" \
    -e "FF_PREF_TRR_MODE=network.trr.mode=2" \
    -e "FF_PREF_ESNI=network.security.esni.enabled=true" \
    -e ENABLE_CJK_FONT=1 \
    -e TZ=Asia/Seoul \
    jlesage/firefox

linuxserver/firefox

docker run \
  --name=firefox \
  --security-opt seccomp=unconfined `#optional` \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -e FIREFOX_CLI=https://.../ `#optional` \
  -e DOCKER_MODS=linuxserver/mods:universal-package-install \
  -e INSTALL_PACKAGES=fonts-noto-cjk \
  -e LC_ALL=ko_KR.UTF-8 \
  -p 3000:3000 \
  -p 3001:3001 \
  -v ./config:/config \
  --shm-size="1gb" \
  --rm \
  -it \
  lscr.io/linuxserver/firefox:latest

Troubleshooting

Running Firefox as root in a regular user's session is not supported

Running Firefox as root in a regular user's session is not supported. ($XDG_RUNTIME_DIR is /tmp/run/user/app which is owned by app.)
chown root $XDG_RUNTIME_DIR

When fonts are not displayed properly

Sometimes fonts are not displayed properly. Firefox displays different kinds of fonts in different situations. Check the following menu.

Preference > General > Font and Colors > Advanced

The following list is shown:

Installing a matching CJK font for each item is recommended. The recommended fonts are Adobe Source Han fonts.

PR_CONNECT_RESET_ERROR

A few lesser-known methods:

Disable DNS prefetch:
DNS prefetching can speed up browsing in Firefox. When a conflict occurs, this feature can sometimes prevent sites from loading normally and lead to the Firefox connection reset problem. Try disabling DNS prefetching by following the instructions below.
about:config -> Change network.dns.disablePrefetch to True.
Disable IPv6
The IPV6 protocol is used by default in many browsers. However, sometimes this browser interferes with the browser and can cause this problem. To fix the error, disable IPV6 by following the instructions below.
about:config -> Change network.dns.disableIPv6 to True.
Change the Do Not Track option
This option sends a signal in the browser header asking websites you visit not to track cookies. This feature can also cause the PR_CONNECT_RESET_ERROR problem in Firefox.
Settings > Privacy & Security > "Do Not Track"

Couldn't load XPCOM

The following error may appear:

XPCOMGlueLoad error for file /opt/firefox/libxul.so:
libasound.so.2: cannot open shared object file: No such file or directory
Couldn't load XPCOM.

Or:

XPCOMGlueLoad error for file /opt/firefox/libxul.so:
libXtst.so.6: cannot open shared object file: No such file or directory
Couldn't load XPCOM.

Install the library:

sudo apt-get install libasound2 libxtst6

See also

Favorite site

Build

Plugin

author Zer0 sitemap