Simple Firefox DNS Hacks To Boost PerformanceBy Angsuman Chakraborty, Gaea News Network
Friday, August 10, 2007
While an individual DNS request often takes small time to execute, when the primary DNS server is overloaded or unavailable it can take quite sometime to resolve your requests. Now what has that to do with improving Firefox performance?
Firefox makes DNS requests to convert host name (like blog.taragana.com) to IP addresses (like 184.108.40.206), which is then used to fetch the web page. To reduce load on DNS servers and to speed up response time, Firefox caches DNS results. In Firefox, by default, the DNS requests are cached for only 1 minute. Firefox performance can be significantly improved by increasing the DNS cache time.
1. To do that type about:config in the address bar and press Enter.
2. Then right click on the preferences table and select New->Integer.
3. Type preference name as: Network.dnsCacheExpiration and Integer value as 3600.
4. This will increase the DNS expiration cache time to 1 hour. You may further increase it if you so wish.
There is a potential downside to increasing the cache time to very large values. Web service providers often use round-robin DNS to provide load balancing (and also increase reliability) with multiple servers on different IP addresses. Caching the DNS to very long period prevents them from providing you with valid website addresses when one or more of their server has gone down. It also prevents websites running on dynamic DNS services from giving you the latest IP addresses of such sites. However with a reasonable value of 1 hour you are fine.
However by itself it may not give you much benefit because by default Firefox can only cache 20 entires. So you should also increase the cache size to anywhere from 100 to 1000. I use 1000. You can change the cache size by similarly (see the documentation above for Network.dnsCacheExpiration) creating a new preference: network.dnsCacheEntries and set its value to 1000.
Close the browser and restart. You are done.