Linux|系统管理|WEB开发

关注Linux,系统管理,WEB开发以及开源世界

给你的firefox加速[转贴]

| Comments

我们期盼已久的 Firefox 1.0 终于发布了,高兴之余,也该为大家贡献的什么。
Firefox已经够快了,还能让它更快吗?试试下面的办法吧。

首先,在你的个人配置文件夹下(关于个人配置文件夹的位置请参阅Firefox使用常见问题和解决方法),建一个名为 user.js 的纯文本文件。然后根据不同的电脑和网络配置,分别输入以下内容:

所有配置的共用设置 (这些设置对所有的配置都是共同的,而不管连接速度或者电脑速度有多快。就是说,不管是下面的哪种配置,这几行代码都加进去。)

 user_pref("network.http.pipelining", true); 
 user_pref("network.http.proxy.pipelining", true); 
 user_pref("network.http.pipelining.maxrequests", 8); 
 user_pref("content.notify.backoffcount", 5); 
 user_pref("plugin.expose_full_path", true); 
 user_pref("ui.submenuDelay", 0); 

1、快速的电脑+快速的连接

 user_pref("content.interrupt.parsing", true); 
 user_pref("content.max.tokenizing.time", 2250000); 
 user_pref("content.notify.interval", 750000); 
 user_pref("content.notify.ontimer", true); 
 user_pref("content.switch.threshold", 750000); 
 user_pref("nglayout.initialpaint.delay", 0); 
 user_pref("network.http.max-connections", 48); 
 user_pref("network.http.max-connections-per-server", 16); 
 user_pref("network.http.max-persistent-connections-per-pro xy", 16); 
 user_pref("network.http.max-persistent-connections-per-s erver", 8); 
 user_pref("browser.cache.memory.capacity", 65536); 

(注:最后一行为 firefox 分配了64M内存缓存。小内存的电脑用户一定要根据自己的实际情况改变这一数值,否则可能会影响系统的整体性能,除非你的内存超 大。我个人觉得,一般情况下,8~16M内存缓存已经够用了。下同。)

2、快速的电脑+较慢的连接 (这个配置更适合那些不是特别快速连接的人,它不是针对拨号连接,而是针对较慢的 DSL / Cable宽带用户。)

 user_pref("content.max.tokenizing.time", 2250000); 
 user_pref("content.notify.interval", 750000); 
 user_pref("content.notify.ontimer", true); 
 user_pref("content.switch.threshold", 750000); 
 user_pref("network.http.max-connections", 48); 
 user_pref("network.http.max-connections-per-server", 16); 
 user_pref("network.http.max-persistent-connections-per-pro xy", 16); 
 user_pref("network.http.max-persistent-connections-per-ser ver", 8); 
 user_pref("nglayout.initialpaint.delay", 0); 
 user_pref("browser.cache.memory.capacity", 65536); 

3、快速的电脑+缓慢的连接

 user_pref("browser.xul.error_pages.enabled", true); 
 user_pref("content.interrupt.parsing", true); 
 user_pref("content.max.tokenizing.time", 3000000); 
 user_pref("content.maxtextrun", 8191); 
 user_pref("content.notify.interval", 750000); 
 user_pref("content.notify.ontimer", true); 
 user_pref("content.switch.threshold", 750000); 
 user_pref("network.http.max-connections", 32); 
 user_pref("network.http.max-connections-per-server", 8); 
 user_pref("network.http.max-persistent-connections-per-pro xy", 8); 
 user_pref("network.http.max-persistent-connections-per-ser ver", 4); 
 user_pref("nglayout.initialpaint.delay", 0); 
 user_pref("browser.cache.memory.capacity", 65536); 

4、慢速的电脑+快速的连接

 user_pref("content.max.tokenizing.time", 3000000); 
 user_pref("content.notify.backoffcount", 5); 
 user_pref("content.notify.interval", 1000000); 
 user_pref("content.notify.ontimer", true); 
 user_pref("content.switch.threshold", 1000000); 
 user_pref("content.maxtextrun", 4095); 
 user_pref("nglayout.initialpaint.delay", 1000); 
 user_pref("network.http.max-connections", 48); 
 user_pref("network.http.max-connections-per-server", 16); 
 user_pref("network.http.max-persistent-connections-per-pro xy", 16); 
 user_pref("network.http.max-persistent-connections-per-ser ver", 8); 

5、慢速的电脑+缓慢的连接 (这个配置适合拨号连接的用户)

 user_pref("content.max.tokenizing.time", 2250000); 
 user_pref("content.notify.interval", 750000); 
 user_pref("content.notify.ontimer", true); 
 user_pref("content.switch.threshold", 750000); 
 user_pref("nglayout.initialpaint.delay", 750); 
 user_pref("network.http.max-connections", 32); 
 user_pref("network.http.max-connections-per-server", 8); 
 user_pref("network.http.max-persistent-connections-per-pro xy", 8); 
 user_pref("network.http.max-persistent-connections-per-ser ver", 4); 

这是根据一些论坛的讨论综合起来的。
我相信,总有一种组合适合于你。
但是要注意:由于硬件的限制,我没有办法进行全部测试。
所以在修改配置的时候要慎重,尤其是对于生手来说,更要 慎重,因为个人的电脑和网络情况千差万别,容易出现各种意想不到的问题。
在操作之前, 一定要先备份个人配置文件夹中的 prefs.js 文件(这个文件储存了你的全部个人配置),一旦发生问题,就把我们新建的uers.js文件删掉,再把 prefs.js 文件复制回去。而且,如果要试验更改不同的配置,也应该先这样做,在你最初的配置的基础上再进行修改。

Comments