Trifork Blog

Disabling the Firefox DNS cache

November 4th, 2006 by

If you, like me, make frequent changes to your host file, for instance because your staging and production environment both listen to the same vhost. You will have probably noticed that it takes Firefox a while to pick up on the alterations you made. This is because in order to improve performance by default Firefox caches DNS lookups for up to 60 seconds. If you do not feel like waiting, restarting the browser is your only option. Fortunately you can disable DNS caching. This is what you do :

Enter about:config in the adress bar.

Right click on the list of properties, select new > integer in the context menu

enter network.dnsCacheExpiration as the preference name and 0 as the integer value

Add another integer preference, this time use network.dnsCacheEntries as the preference name and again 0 as the value

5 Responses

  1. November 5, 2006 at 23:45 by Alef Arendsen


    where did Audio Video Disco go??

  2. November 6, 2006 at 09:50 by site admin

    Some people *cough* uri didn’t think the name was catchy enough 🙂 So I changed it to something a bit more … je ne sais quoi

  3. November 17, 2006 at 19:07 by Sam

    Please add firefox cookies/bad web sites immunization in next version!
    Firefox 2 cannot reject third party cookies!!!!!!!!

  4. December 10, 2007 at 01:45 by Firefox settings · the occasional blog

    […] found this blogger’s note about Firefox DNS […]

  5. […] Bonus:  Disabling the Firefox DNS cache […]