| Computer Education | |||||||
|
|
| To help speed up Web browsing, Windows XP, Vista, and 7 come with a local cache containing any DNS addresses that have been looked up recently. (For more detail on how Internet addresses work, see this article.) Once an URL has been resolved by an Internet name server into a numerical IP, the information is stored locally. Anytime your browser requests an URL, Windows first looks in the local cache to see if it is there before querying the external name server used by your ISP. If it finds the resolved URL locally it uses that IP. This is supposed to save time and cut down on Web traffic Clear the DNS resolver cache A problem can arise if the IP for an URL changes or the DNS entry gets corrupted while it is still stored in the local cache. In this case an error message will result
if you try to connect to the URL. It is not a frequent occurrence but
is not unknown. Fortunately, it is possible to clear out the local DNS cache in order to
get around these types of problems. All current versions of Windows come with a useful
command-line utility ipconfig (discussed
here)
that has a switch, flushdns,
for removing the entries in the cache.
Open a command prompt and enter If you are curious about the contents of the DNS cache, they can be seen
by using another switch with ipconfig.
In this case open a command prompt and enter Configure the DNS resolver cache in Windows XPAccording to Microsoft, Windows XP keeps IPs in the DNS cache for a default time of 86,400 seconds or one day. (Various web browsers may actually use a shorter time.) This time period can be changed by reducing the Time to Live or TTL. This requires a Registry edit so should
be done only by those who know how to restore their Registry. The
Registry key that is involved is
Negative responses are another story. There is a default DNS caching of negative results for fifteen minutes, which would be neither convenient nor necessary. I often encounter Web sites that do not respond immediately but which are available after a short wait and a retry. Although different browsers may use different parameters, I see no reason to store negative responses in the DNS cache and I have tweaked my own Registry to prevent them from being entered. In this case create a DWORD value for the above Registry key and name it MaxNegativeCacheTtl. Set the value to “0” (zero). If you prefer to keep the negative responses, but with a shorter TTL, enter the appropriate number of seconds. The default TTL is 900 seconds. I have been unable to find any Microsoft reference about the cache times in Windows Vista and Windows 7 so the discussion in this section pertains to Windows XP only. How to stop DNS cachingNormally, DNS caching is useful and speeds up web browsing. Should you wish to temporarily disable it for diagnostic purposes, there are two different command-line ways to achieve this. Open a command prompt (elevated privileges required in Windows Vista or 7) and enter |
| << Home page | ©2002-2013 Victor Laurie | Home page >> |