Mozilla 网络相关首选项

This is an archived page. It's not actively maintained.




要想获取关于首选项(包括如何编辑)的通用技术文档,请参阅“有关 Mozilla 首选项的简要指南”一文。

本文的目标是准确地记录有关 Core-Necko 的行为及是否在 Firefox 中默认存在的信息。


The sections are in roughly alphabetical + functional order. The preferences are in order of usage by the UI (which is not often alphabetical order). Relevant bugs are provided only when absolutely necessary.

Note: Do not change any of these via about:config unless you know what you are doing. If you are uncertain what that phrase means, you probably do not.

If you qualify, you are probably one or more of the following:

  • You have a feature-spec or code-level understanding of the preference.
  • You are doing testing and have a clear performance metric.
  • You are doing this in conjunction with a packet trace to monitor Necko's changed behavior.




首选项名称 可接受的值 首选项是否默认存在及其他说明
general.useragent.contentlocale string  
general.useragent.misc (major version number) string string  
network.http.accept-encoding gzip,deflate (default string) no UI
network.http.accept.default text/xml,application/xml,


network.http.default-socket-type (empty) default ?
network.http.keep-alive true (default)  
network.http.keep-alive.timeout 30 no UI
network.http.max-connections 96  
network.http.max-connections-per-server 32  
network.http.max-persistent-connections-per-proxy 4  
network.http.max-persistent-connections-per-server 8  
network.http.pipelining True ? (on in mozilla, greyed)
network.http.pipelining.firstrequest True  
network.http.pipelining.maxrequests 8  Hard-coded to 8 max so 30 will have no greater affect
network.http.proxy.keep-alive true (default)  
network.http.proxy.pipelining True ? (on in mozilla, greyed)
network.http.proxy.version 1.1 (default)
network.http.redirection-limit 20  
network.http.request.max-start-delay 10  
network.http.sendRefererHeader 2  
network.http.sendSecureXSiteReferrer true  
network.http.use-cache true  
network.http.version 1.1 (default)


首选项名称 Acceptable Values Preferences UI and comments
security.checkloaduri true (default)
checkloaduri will disable file:// URLs on pages from a network (http: https: ftp:) source, for security reasons.
Errors are sent to the javascript console, not to the user via dialog box. This preference only works in Gecko versions before 1.8 (so Firefox 1.0 and Mozilla Suite builds). In Firefox 1.5 and Seamonkey 1.0 this preference no longer has an effect.


首选项名称 Acceptable Values Preferences UI (in bold) and comments
advanced.mailftp false (default)
Preferences | Advanced |
"[x] Set this email address as anonymous FTP password:"

If false, FTP uses "" as anonymous FTP password (bug 101027)
If true, FTP uses contents of network.ftp.anonymous_password for anonymous FTP password (bug 57763 comment 28)
network.ftp.anonymous_password empty (default)
any text string
Preferences | Advanced |
(under "[ ] Set this email address as anonymous FTP password:")
[text field]

If empty, FTP uses "" as anonymous FTP password.
network.ftp.idleConnectionTimeout 300 (default)
any integer
Measured in seconds
The open connection can prevent other FTP clients on your system from connecting to sites that allow only one control connection (bug 117875)
network.dir.format 0 = HTML view
1 = raw view
2 = HTML view
3 = XUL view
Preferences | Debug | Networking
Directory Listing Format
( ) HTML
( ) XUL (tree-based)


首选项名称 Acceptable Values Preferences UI (in bold) and comments

256000 (default)

any integer (in KB)

Preferences | Advanced | Cache
Cache: [MB] MB

Note: The default was 51200 prior to Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6).
browser.cache.disk.parent_directory path to Cache folder in profile (default)

Cache Folder: [text box]

Note: The contents of the disk and memory caches are different (a very large memory cache is not the same as pointing disk cache to memory mapped disk space (RAM disk).

51200 (default)

-1 = no limit

The maximum size of an entry in the disk cache.

Note: Items larger than 1/8 of browser.cache.disk.capacity are never cached.
browser.cache.check_doc_frequency 1 = Every time I view the page
0 = Once per session
3 = When the page is out of date (default)
2 = Never
Compare the page in cache to the page on the network:
browser.cache.disk.enable true (default) Preferences | Debug | Cache
[x] Enable Disk Cache
[x] Enable Memory Cache

Disabling disk cache has the effect of setting it to zero.
browser.cache.memory.enable true (default)
browser.cache.memory.capacity any integer (in KB) Replaced by automatic sizing in Mozilla 1.4b (bug 105344).
This value overrides the application.
0 disables feature
(before, 4096 = default)

5120 (default)

-1 = no limit

The maximum size of an entry in the memory cache (in KB).

Note: Items larger than 90% of browser.cache.memory.capacity are never cached.
network.http.use-cache true (default) no UI
browser.cache.disk_cache_ssl false (default) no UI, added in 1.6a (see bug 205921)
network.prefetch-next False Preferences | Advanced | Cache: Link Prefetching
[x] Prefetch web pages when idle, so that links in web page designed for prefetching can load faster.
browser.cache.disk.smart_size.first_run true (default) Indicates whether or not this is the first time smart sizing has been used.
browser.cache.disk.smart_size.enabled true (default) Indicates whether or not smart sizing of the disk cache is enabled.


首选项名称 Acceptable Values Preferences UI (in bold) and comments
network.dnsCacheExpiration 60 (seconds) default pref-less, not visible in about:config.
Create and set both values to "0" to disable.
network.dnsCacheEntries 20 (entries)


The old section in this document was removed because of dwitte's cookies re-write. Please see: Cookies Preferences in Mozilla


首选项名称 Acceptable Values Preferences UI (in bold) and comments
network.proxy.type 0 = direct
1 = manual
2 = PAC
3 = mapped to 0
4 = WPAD
Preferences | Advanced | Proxies
Configure Proxies to Access the Internet
( ) Direct connection to the internet
( ) Auto-detect proxy settings (new in 1.8)
( ) Manual proxy configuration
( ) Automatic proxy configuration URL

3 was old Communicator value for DIRECT.
network.proxy.http <Protocol> Proxy: hostname or IPv4 is acceptable. IPv6 needs to be tested.

Port: 0 will cause server:port preference for that manual proxy type to be ignored. 1-65xxx is valid range
Affects http: URLs
network.proxy.ssl Affects https: URLs
Possibly affects SIMAP and SNEWS
network.proxy.ftp Affects ftp: URLs
network.proxy.gopher 已废弃 Gecko 2.0 Affects gopher: URLs
network.proxy.gopher_port 已废弃 Gecko 2.0
network.proxy.socks Used when application-specific proxy is not configured. Possibly affects other protocols
network.proxy.socks_version 5 (default)
Communicator supported only SOCKS V4.
network.proxy.no_proxies_on localhost, (default)
string of comma delimited fqdn's, hostnames, IPv4 addresses and CDIR blocks. See No Proxy For configuration.
Localhost is not proxied by default, bug 31510.
network.proxy.autoconfig_url empty (default)
URL string
must be absolute URl, no hostname


Preference Name Acceptable Values Preferences UI (in bold) and comments true = Mozilla is online (default)
false = Mozilla is offline
Necko updates the offline|online status to this value.
Changing this value does not change the actual networking status.
Value is not updated if "Ask me for online state at startup" was selected
for the current profile (bug 229677).
offline.startup_state 0 = use (default)
1 = prompt user
Preferences: Mail & Newsgroups | Offline | When starting up:
(Pref affects all modules, but was moved from Pref root, bug 202529)
[x] Remember previous online state
(Uses to set online|offline status at startup)
[ ] Ask me for online state at startup
(Unlike Communicator, prompt always appears, bug 239564)


Preference Name Acceptable Values Comments (bold for areas that user configures)
network.dir.format see FTP 已废弃 Gecko 2.0


Preference Name Acceptable Values Comments (bold for areas that user configures)
browser.xul.error.pages.enabled false (default)
Does not appear in about.config unless added explicitly. See bug 28586)
network.protocol-handler.external.SCHEME false (default)
Mac+Windows: sends URLs of <SCHEME> to the default OS handler
Linux/UNIX: sends URLs to application
For example: network.protocol-handler.external.mailto==true is used by Phoenix/Firebird/Firefox to access default mailers.
Handlers loaded before prefs are read cannot be redirected (e.g. file:)



  • browser.cache.enable
  • networking.proxy.wais
  • networking.proxy.wais_port
  • network.http.connect.timeout
  • network.http.proxy.ssl.connect

Under Investigation

  • offline.startup_state
  • Author(s): Benjamin Chuang
  • Last Updated Date: July 26, 2007
  • Copyright Information: Portions of this content are © 1998–2007 by individual contributors; content available under a Creative Commons license | Details.