Firefox DNS Caching

Type
Status
Concerning

The Domain Name System is a distributed database that maps names to computers' IP addresses. It's one of the cornerstones of the Internet.

Because it is so important, there are many standard ways of working with it. Some people, for example, may want to cache their DNS results if they have a slow connection to the Internet, or to their DNS server in particular. Linux, for example, provides caching hooks right in the GNU C library. Windows also provides DNS caching.

But Firefox decided that it's smarter than the traditional approaches and the operating systems that it's running on. It has its own rules about caching DNS. Therefore, when I monkey with my DNS (perhaps by adding new names, or adding things to /etc/hosts), I find that Firefox sometimes tries to access the old IP address of a computer I've just changed, even though the rest of my computer will go to the new one.

Boo!

That is not how I want my computer to behave. If it was, I would have turned on DNS caching in my operating system.

There's a way to turn off this behavior.

Firefox secret "about:config" page, that lists all the configurable options, even if they aren't exposed to the UI.

Apparently, there's an even MORE secret set of config options, and you have to know the names and add them to the config page yourself.

I found this out from this guy's blog:
http://blog.taragana.com/index.php/archive/simple-firefox-hacks-to-boost-performance/

But that guy gets it all wrong. He's telling you how to increase the amount of caching that Firefox does, therefore breaking the traditional DNS approaches even further.

No. You should be turning off the DNS caching.

I found that I could turn off the DNS caching by going to about:config, and then right-clicking. I told it to add a New preference that is an integer. The name of that preference is:
network.dnsCacheEntries

Set it to 0.

You can now actually use your computer the way it was meant to be used.

Your rating: None Average: 2.5 (2 votes)

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
                          _    __   _ 
____ _ _ __ _ (_) / _| (_)
|_ / | | | | / _` | | | | |_ | |
/ / | |_| | | (_| | | | | _| | |
/___| \__,_| \__, | _/ | |_| |_|
|___/ |__/
Enter the code depicted in ASCII art style.