Applies ToInternet Explorer

Support for Internet Explorer ended on June 15, 2022

Internet Explorer 11 has been permanently disabled through a Microsoft Edge update on certain versions of Windows 10. If any site you visit needs Internet Explorer 11, you can reload it with Internet Explorer mode in Microsoft Edge. We recommend you use Microsoft Edge  for a faster, more secure and more modern web browsing experience.

Get started with Microsoft Edge

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

Summary

In earlier versions of Internet Explorer (Internet Explorer 3.x), DNS host entries are cached for 24 hours by default. In many cases, this is too long. During this period, some host entries stop working because of change in the IP address of the remote server that was initially resolved. Internet Explorer 4.x and later versions modify how DNS host entries are cached by decreasing the default time-out value to 30 minutes.

More Information

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk. In some cases, this new time-out setting is too short. If your environment has a number of clients that are connecting and are all performing DNS lookups every 30 minutes, you may experience an unwanted increase in network traffic. To modify this behavior, make the following registry change:

  1. Start Registry Editor.

  2. Locate and click the following key in the registry:

    HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings

  3. On the Edit menu, click Add Value, and then add the following registry values:

    Value Name: DnsCacheTimeout Data Type: REG_DWORD Radix: Decimal Value: (time in seconds) Value Name: ServerInfoTimeOut Data Type: REG_DWORD Radix: Decimal Value: (time in milliseconds)

  4. Quit Registry Editor.

For example, to set the time-out value to 10 minutes, use a value of 600 seconds.

Note

You must use both the registry values listed in step 3 to control the Internet Explorer internal resolver cache mechanism.

Note

These settings apply to Internet Explorer and Asynchronous WinInet calls only. These settings do not apply to Synchronous WinInet calls.

Workaround

If you are making Synchronous calls in WinInet, the DNS timeouts do not work when set the way they are shown in the "More information" section. Asynchronous calls do pick up these values correctly.

Method 1

To work around this problem, restart the application that uses WinInet.

Method 2

Use the following code workaround. Open and close the handle that you receive with the InternetOpen call, and then open it again.

            
hOpen=::InternetOpen(.....)
InternetCloseHandle(hOpen);
hOpen=::InternetOpen(.....);
// 

Now use the handle. The DNS timeouts are applied.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.