Slow browsing in Internet Explorer because of multiple isInNet function calls

Symptoms

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, "192.168.3.4","255.255.255.0")) ||
    isInNet(host, "10.10.1.1", "255.255.255.0") ||
    isInNet(host, "72.10.10.10", "255.240.0.0")) ||
    isInNet(host, "172.16.0.0", "255.240.0.0"))
    {

     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. 

Cause

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.

Resolution

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, "192.168.3.4","255.255.255.0")) ||
    isInNet(resolved_IP, "10.10.1.1", "255.255.255.0") ||
    isInNet(resolved_IP, "72.10.10.10", "255.240.0.0")) ||
    isInNet(resolved_IP, "172.16.0.0", "255.240.0.0"))
    {

     return PROXY <proxyname:PORT>;

    }

    }

Properties

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

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

Feedback