火狐

来自百合仙子's Wiki
跳转到导航 跳转到搜索

智能地址栏

支持以下搜索范围限定符。这些字符可以放在最开头,也可以放在搜索词之后,并且可以联合使用多种限定符。[1]

限定符 搜索范围
^ 访问历史
* 书签
+ 已加标签书签
% 打开的标签页
# 页面标题或者标签名
$ URL
? 搜索建议

与鼠标结合使用的修饰键

[2]

上下文 鼠标键 修饰键 功能
链接 中键 (无) 在后台标签页打开链接
Ctrl
Shift 在前台标签页打开链接
Ctrl+Shift
左键 Ctrl 在后台标签页打开链接
Shift 在新窗口打开链接
Alt 不打开链接(可用于选中)
滚轮 Shift 从垂直滚动改为水平滚动
Ctrl 缩放页面
Alt 前进/后退
右键 Shift 禁用页面自己的上下文菜单

about:config

浏览器

browser.ctrlTab.previews
Ctrl-Tab切换时预览(以前版本的为browser.allTabs.previews)。默认为false
browser.urlbar.trimURLs
是否去掉链接中的http://ftp://以及最后的 /(火狐7+)。默认为true
browser.urlbar.clickSelectsAll
单击地址栏时首先选中整个 URL。默认为false
browser.urlbar.doubleClickSelectsAll
双击地址栏时选中整个 URL。默认为true
browser.tabs.animate
新建或关闭标签页时是否使用动画。默认为true,禁用后速度可能会有较大提升
browser.tabs.insertRelatedAfterCurrent
是否在当前标签页的旁边(而不是最右边)打开标签页。默认为true

扩展

要允许扩展在 amo 上启用,添加配置项 privacy.resistFingerprinting.block_mozAddonManagertrue 并更新 extensions.webextensions.restrictedDomains 即可(有可能需要重启浏览器)。[3]

插件相关

火狐3.6以及之后的版本增加了插件崩溃保护,其等待插件的时间由dom.ipc.plugins.timeoutSecs指定。

fcitxFlash 中无法使用,可以设置dom.ipc.plugins.enabledfalse,或者dom.ipc.plugins.enabled.libflashplayer.sofalse[4]

UI

ui.key.generalAccessKey配置 accesskey。默认-1,使用ui.key.chromeAccessui.key.contentAccess0禁用,17使用Ctrl18使用Alt[5]

ui.key.chromeAccess[6]配置 chrome 区域 accesskey,ui.key.contentAccess[7]配置网页内使用的 accesskey;按二进制位取值。0禁用,1Shift2Ctrl4Alt8Meta。Linux 下默认为5——使用Shift+Alt

交互

middlemouse.contentLoadURL
决定点中键时是否载入选择区的网址。默认为 false[8]
middlemouse.paste
使用中键粘贴到文本域,为false则执行middlemouse.contentLoadURL指定的操作。Linux默认为true,其它平台为false[9]
accessibility.typeaheadfind.enablesound
即时查找失败时是否发生声音提示。默认是。[10]alsamixer 的「beep」项静音也可以关掉这个声音)

网络

network.proxy.socks_remote_dns,布尔值
使用 socks 代理时在远程解析域名
network.cookie.cookieBehavior,整数
默认值0允许第三方 cookie。设置为1禁用。此选项在「首选项」的「隐私」标签页。
network.http.sendRefererHeader,整数
发送 HTTP Referrer 的条件[11]
  • 0: 不发送和设置document.referer
  • 1: 在点击链接时发送和设置document.referer
  • 2: 在点击链接和载入图片时发送和设置document.referer(默认)
network.http.sendSecureXSiteReferrer,布尔值
是否在跨域访问 HTTPS 网站时发送 Referrer 头。默认是。[12]

不兼容安全网站不发送跨域 referrer 的网站:

  • 天猫
  • 使用「极速验证」的网站
  • 百度贴吧?

开发

devtools.chrome.enabled=true
在 Scratchpad 中允许在火狐自身 XUL 中执行代码[13]

安全

security.csp.enable
是否启用 CSP。火狐 20 默认启用。此功能将导致使用了 CSP 的网站无法使用小书签[14]
security.tls.version.max
启用最高 TLS 版本。火狐 26 支持了 TLS v1.1 和 v1.2,但是默认并没有启用。将此值设置为3来启用之。[15]
offline-apps.allow_by_default
是否默认允许网站存储离线消息。较新版本中默认允许;设置为false时会征求用户同意。

隐私保护

user_pref("privacy.fingerprintingProtection", true);
user_pref("privacy.fingerprintingProtection.granularOverrides", "[{\"firstPartyDomain\":\"mihoyo.com\",\"overrides\":\"-WebGLRenderCapability\"},{\"firstPartyDomain\":\"amap.com\",\"overrides\":\"-WebGLRenderCapability\"},{\"firstPartyDomain\":\"google.com\",\"overrides\":\"-WindowDevicePixelRatio\"}]");
user_pref("privacy.fingerprintingProtection.overrides", "+AllTargets,-UseStandinsForNativeColors,-CSSPrefersColorScheme,-CSSPrefersReducedMotion");

+AllTargets 开启所有选项。-UseStandinsForNativeColors 是为了选区高亮。-WindowDevicePixelRatio 是为了 Google 表格文字在分数倍缩放下不糊。-WebGLRenderCapability 是为了高德地图大小正常,但还需要授予读取 canvas 的权限才能让文字正常渲染。[16]

尚未解决的问题:

其它

general.smoothScroll.other
滚动到页面顶部/底部(等?)时是否使用平滑滚动。默认开启。

与 systemd 的配合

给火狐的 service 加上:

[Service]
KillMode=process
OOMPolicy=continue
OOMScoreAdjust=0

给系统 systemd 加上:

# /etc/systemd/system/user@.service.d/resources.conf
[Service]
OOMScoreAdjust=0

配置文件

参见Profile folder - MozillaZine Knowledge Base

另见火狐数据库

同步

更改为使用中国的服务器

[17]

// 50以上版本必须将 https://accounts.firefox.com.cn 加入 webchannel.allowObject.urlWhitelist
user_pref("identity.fxaccounts.migrateToDevEdition", true);
user_pref("identity.fxaccounts.auth.uri", "https://api-accounts.firefox.com.cn/v1");
user_pref("identity.fxaccounts.remote.force_auth.uri", "https://accounts.firefox.com.cn/force_auth?service=sync&context=fx_desktop_v3");
user_pref("identity.fxaccounts.remote.oauth.uri", "https://oauth.firefox.com.cn/v1");
user_pref("identity.fxaccounts.remote.profile.uri", "https://profile.firefox.com.cn/v1");
user_pref("identity.fxaccounts.remote.signin.uri", "https://accounts.firefox.com.cn/signin?service=sync&context=fx_desktop_v3");
user_pref("identity.fxaccounts.remote.signup.uri", "https://accounts.firefox.com.cn/signup?service=sync&context=fx_desktop_v3");
user_pref("identity.fxaccounts.remote.webchannel.uri", "https://accounts.firefox.com.cn/");
user_pref("identity.fxaccounts.settings.uri", "https://accounts.firefox.com.cn/settings?service=sync&context=fx_desktop_v3");
user_pref("identity.sync.tokenserver.uri", "https://sync.firefox.com.cn/token/1.0/sync/1.5");
user_pref("services.sync.fxa.privacyURL", "https://accounts.firefox.com.cn/legal/privacy");
user_pref("services.sync.fxa.termsURL", "https://accounts.firefox.com.cn/legal/terms");
user_pref("services.sync.statusURL", "https://accounts.firefox.com.cn/status/");

账号

要在中国服务器上设置次要邮箱为主邮箱,访问 https://accounts.firefox.com.cn/settings?canChangeEmail=true

Mac OS X 下的快捷键

  • 默认 accesskey:版本 2 到 13 使用Ctrl前缀,14.0.1 以后使用Ctrl-Option(与 Google Chrome 相同)[18]。可通过ui.key.contentAccess选项修改[19]
  • 前进/后退默认使用Cmd前缀
  • 设置选项ui.key.accelKey17可使快捷键(如查找的快捷键Cmd-f)前缀由Cmd改为Ctrl(需要重启)[20]
  • 可通过修改默认选项支持鼠标中键粘贴和中键定位滚动条(后者需要重启)

问题及解决方案

中键单击在百度贴吧等无效

当设置了middlemouse.paste=true并且页面含有contenteditable元素时会这样。[21]

不能记住密码

如果表单使用了 autocomplete="off" 或者部分必须的表单元素没有 name 属性,火狐将不记住此表单的密码。

信任被黑名单的 CA 证书

在证书管理器里,先从「服务器」标签删除这些证书,「确定」。然后再在「证书机构」标签里「编辑信任」,选择信任这些证书。

参见

外部链接

自定义

附加组件

  • [1] 扩展网站 API

火狐内部原理

参考资料