火狐
智能地址栏
支持以下搜索范围限定符。这些字符可以放在最开头,也可以放在搜索词之后,并且可以联合使用多种限定符。[1]
| 限定符 | 搜索范围 |
|---|---|
| ^ | 访问历史 |
| * | 书签 |
| + | 已加标签书签 |
| % | 打开的标签页 |
| # | 页面标题或者标签名 |
| $ | URL |
| ? | 搜索建议 |
与鼠标结合使用的修饰键
| 上下文 | 鼠标键 | 修饰键 | 功能 |
|---|---|---|---|
| 链接 | 中键 | (无) | 在后台标签页打开链接 |
| 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_mozAddonManager 为 true 并更新 extensions.webextensions.restrictedDomains 即可(有可能需要重启浏览器)。[3]
插件相关
在火狐3.6以及之后的版本增加了插件崩溃保护,其等待插件的时间由dom.ipc.plugins.timeoutSecs指定。
fcitx 在 Flash 中无法使用,可以设置dom.ipc.plugins.enabled为false,或者dom.ipc.plugins.enabled.libflashplayer.so为false。[4]
UI
ui.key.generalAccessKey配置 accesskey。默认-1,使用ui.key.chromeAccess和ui.key.contentAccess。0禁用,17使用Ctrl,18使用Alt。[5]
ui.key.chromeAccess[6]配置 chrome 区域 accesskey,ui.key.contentAccess[7]配置网页内使用的 accesskey;按二进制位取值。0禁用,1Shift,2Ctrl,4Alt,8Meta。Linux 下默认为5——使用Shift+Alt。
交互
middlemouse.contentLoadURL- 决定点中键时是否载入选择区的网址。默认为
false[8] middlemouse.paste- 使用中键粘贴到文本域,为
false则执行middlemouse.contentLoadURL指定的操作。Linux默认为true,其它平台为false[9]
网络
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(默认)
- 0: 不发送和设置
不兼容安全网站不发送跨域 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]
尚未解决的问题:
- MediaWiki 保存快捷键失效
其它
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。
另见火狐数据库。
同步
更改为使用中国的服务器
// 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.accelKey为17可使快捷键(如查找的快捷键Cmd-f)前缀由Cmd改为Ctrl(需要重启)[20] - 可通过修改默认选项支持鼠标中键粘贴和中键定位滚动条(后者需要重启)
问题及解决方案
中键单击在百度贴吧等无效
当设置了middlemouse.paste=true并且页面含有contenteditable元素时会这样。[21]
不能记住密码
如果表单使用了 autocomplete="off" 或者部分必须的表单元素没有 name 属性,火狐将不记住此表单的密码。
信任被黑名单的 CA 证书
在证书管理器里,先从「服务器」标签删除这些证书,「确定」。然后再在「证书机构」标签里「编辑信任」,选择信任这些证书。
参见
外部链接
- 手动修改Firefox状态栏图标顺序的终极方法 | 七星庐
- 怎样在火狐中新建个协议然后调用某软件 - 扩展 - 广场 @ Mozest.com - Mozilla 中文支持社区与中文本地化网站
- 所有语种/平台的火狐版本下载地址(非中国版/下载器)
- firefox 提速! | delectate's blog
- 推薦網頁瀏覽器 Firefox:Hemiola的網頁
- {firefox} 使用 adBlock 屏蔽广告
自定义
附加组件
- [1] 扩展网站 API
火狐内部原理
- 浏览Firefox中自带的xul文件 | 七星庐
- 火狐的一些about:* | delectate's blog
- Chrome URLs - MozillaZine Knowledge Base
- The Places frecency algorithm | MDN
- About protocol links - MozillaZine Knowledge Base
- Tabbed browser - Code snippets | MDN, 关于标签页管理和事件等
参考资料
- ↑ Address bar autocomplete in Firefox - Search your bookmarks, history and tabs
- ↑ Chris's Wiki :: Firefox's middle-click behavior on HTML links on Linux
- ↑ tridactyl/tridactyl: A Vim-like interface for Firefox, inspired by Vimperator/Pentadactyl.
- ↑ 流水和记录 | CS Slayer
- ↑ Ui.key.generalAccessKey - MozillaZine Knowledge Base
- ↑ Ui.key.chromeAccess - MozillaZine Knowledge Base
- ↑ Ui.key.contentAccess - MozillaZine Knowledge Base
- ↑ http://kb.mozillazine.org/Middlemouse.contentLoadURL
- ↑ http://kb.mozillazine.org/Middlemouse.paste
- ↑ The "find in page sound" and how to it off in Firefox
- ↑ http://kb.mozillazine.org/Network.http.sendRefererHeader
- ↑ http://kb.mozillazine.org/Network.http.sendSecureXSiteReferrer
- ↑ Scratchpad | MDN
- ↑ Content Security Policy · GitHub
- ↑ Crypto Fails — Firefox still hasn't enabled TLS v1.1 by default
- ↑ 各个选项的定义
- ↑ [Sync]将火狐同步切换到位于中国的服务器,大大加快同步速度
- ↑ Access key - Wikipedia, the free encyclopedia
- ↑ Ui.key.contentAccess - MozillaZine Knowledge Base
- ↑ Customizing Mozilla
- ↑ 『GM 脚本』修复 HTML5 的属性(contenteditable)引起的 bug | 杂之学