Slow browsing in Internet Explorer because of multiple isInNet function calls


Consider the following scenario:
  • Internet Explorer is configured to use a Proxy Auto Configuration (PAC) file or WPAD for proxy settings.
  • The PAC file contains several calls to the isInNet() function, which resemble the following:

    function FindProxyForURL(url, host)

    if (isInNet(host, "","")) ||
    isInNet(host, "", "") ||
    isInNet(host, "", "")) ||
    isInNet(host, "", ""))

     return PROXY <proxyname:PORT>;



If there are several such isInNet() calls in the PAC file, Internet Explorer takes longer than expected to browse to a webpage. 


This issue occurs because Internet Explorer must make additional calls to the DNS subsystem to determine the IP address of the host parameter. It must do this in order to compare the IP address of the host parameter against the IP address range that's provided in the isInNet() function call.


To prevent these additional calls to the DNS subsystem every time a "host" is passed to the isInNet() function call, take steps to resolve the host name to the IP address outside of the isInNet() calls by passing the IP address instead of the host name. 

To do this, modify the sample code in the "Symptoms" section as follows:
  • function FindProxyForURL(url, host)

    var resolved_IP = dnsResolve(host);

    if (isInNet(resolved_IP, "","")) ||
    isInNet(resolved_IP, "", "") ||
    isInNet(resolved_IP, "", "")) ||
    isInNet(resolved_IP, "", ""))

     return PROXY <proxyname:PORT>;




Article ID: 3140773 - Last Review: Mar 17, 2016 - Revision: 1

Windows Internet Explorer 9, Windows Internet Explorer 8, Internet Explorer 10