clearing your dns cache

David Jones
@david3jones
avatar-davidejones

Caching is a very common technique and is used all over the place from your ISP caching dns requests to your browser caching website files down to your own computer configuration. Its something that silently runs in the background speeding the use of technology for us and is something that we rarely notice. Not very often but every once in a while I notice that a website we change the dns on will work for my colleagues on the same network but will not work for me. This isn’t their browser caching anything as i’ve asked them to try a different browser and clear their temporary files cache. We are all on the same network and have the same dns settings and use the same ISP so what could it be? Well when this happens i usually resort to clearing the individual computers dns cache. I have a little batch file on my desktop for just such an occasion. Its infact become a habbit for me to run this file clear my browsers cache and then to test a site just to be sure.

@echo off
echo Preparing to flush the dns...
ipconfig /flushdns
net stop dnscache
net start dnscache
PAUSE

Comments

  • avatar-andrew
    # Andrew
    I’m wondering if you know how to write a batch or script file, to flush the dnscache, that will be triggered on certian conditions and/or run under as a task, via Windows Task Schedular?
  • avatar-davidejones
    # davidejones
    Hey i’m sorry but i haven’t had much experience doing those things so i don’t think i can really help there. I’m sure you can find the resources online and use my snippet above with it.

Comments are currently closed