Page 1 of 1

Bit More Firefox Help.

Posted: 2005-05-16 05:51pm
by Einhander Sn0m4n
Is there a way to stop FF from DNS-looking-up a site it's already done so for? It seems to do that for EVERY LAST SITE I go to every few hours, greatly slowing down the page load times whilst it does so.

Posted: 2005-05-16 06:51pm
by Pu-239
??
Maybe put oft-visited sites in the hosts file?

I run a caching DNS server for that purpose.

Posted: 2005-05-16 08:57pm
by Einhander Sn0m4n
No linux here. I really don't want to edit my hosts file, I just want FF to DNS lookup ONCE per day instead of twenty times a day!

Also, can someone recommend a really nice fast DNS server for me to point FF at?

Posted: 2005-05-17 02:52am
by Datana
Einhander Sn0m4n wrote:Also, can someone recommend a really nice fast DNS server for me to point FF at?
Not sure about a good DNS caching program for Windows, but if you want a fast DNS server, here are some ones I dug up while searching for a replacement for the unstable Comcast one. The Verizon ones tend to be fastest, while the ORSC ones are the most consistently reliable. I've simply set up my router to default to one and fall back to the other.

4.2.2.1 - Verizon DNS-1
4.2.2.2 - Verizon DNS-2

199.166.28.10 - ORSC, Atlanta, Ga
199.166.29.3 - ORSC, Nederlands
199.166.31.3 - ORSC, Orlando, FL, USA
199.5.157.128 - ORSC, Detroit, MI, USA

205.171.2.65 - resolver1.qwest.net
205.171.3.65 - resolver2.qwest.net

66.93.87.2 - Speakeasy 1
216.231.41.2 - Speakeasy 2
216.254.95.2 - Speakeasy 3
64.81.45.2 - Speakeasy 4

Posted: 2005-05-17 03:29pm
by Einhander Sn0m4n
Thanks Datana. Now about my first question...

Anyone?

Posted: 2005-05-17 03:57pm
by Jew
My source is this web page. You need to do the following.
  • Close Firefox
  • Open the folder containing your Firefox profile. On Windows XP this would be something like C:\Documents and Settings\myusername\Application Data\Mozilla\Firefox\rywmrq1l.default
  • Open the prefs.js file in Notepad
  • Add the following lines to prefs.js

    Code: Select all

    user_pref("network.dnsCacheEntries", 500);
    user_pref("network.dnsCacheExpiration", 3600);
    The first line tells Firefox how many DNS entries to cache. The second tells it how many seconds it should keep a cached entry before looking it up again. 3600 seconds would be one hour.
  • Save prefs.js and start Firefox.
  • Type about:config into the address bar, and then check to see if the entries you added to prefs.js show up in the list. If they do, you're done. If not, you screwed up somewhere.
I could be entirely wrong and maybe the above instructions don't work at all. I didn't try it myself, because I use Firefox as a development tool and no-way, no-how do I ever want to cache an IP address when I'm working on developing or troubleshooting a website.

Posted: 2005-05-17 05:42pm
by Einhander Sn0m4n
Thanks Jew, you hit the nail dead on. I set the cache expiration to 86400.

Posted: 2005-05-17 08:26pm
by althornin
Einhander Sn0m4n wrote:Thanks Jew, you hit the nail dead on. I set the cache expiration to 86400.
I just don't understand the need to do this.
DNS caching should always follow the set TTL from the originating DNS server.
Else, if they change IP addresses, you will have to wait (longer) before your lookups resolve to the new ones.

I mean, there are good reasons for leaving DNS caching alone. I don't understand what this gets you, as Firefox merely asks the OS for a lookup, and standard (normal) TTL times are 3600 seconds, or one hour.
How can a few extra DNS lookups really affect your browsing speed? Unless your ISP's DNS server is god-awful....I don't see how looking up the address once a day vs once per hour is really going to matter.

Posted: 2005-05-17 09:51pm
by Einhander Sn0m4n
It is gods-awful. Twenty seconds just to do a lookup for a site that loads in just one second? Jesus Homosexual Christ!

Posted: 2005-05-17 10:14pm
by Jew
Einhander Sn0m4n wrote:It is gods-awful. Twenty seconds just to do a lookup for a site that loads in just one second? Jesus Homosexual Christ!
I think Firefox's default is to cache an IP address for 60 seconds. Any further caching is done by either the local computer or the DNS server. And if your DNS server is on the fritz, then believe me, it kills your performance.

I used to run my own caching DNS server at home, and if it ever had a problem I could tell immediately because whenever I browsed the web things would take unusually long. So if Einhander Sn0m4n's ISP has a slow DNS server, then he could significantly boost performance by running his own caching DNS server. That's rather complicated to do, so telling Firefox to cache IP addresses is a simpler solution.