dnsResolve

The function dnsResolve (and similar other functions) performs a DNS lookup that can block your browser for a long time if the DNS server does not respond.

If you cache proxy auto-configuration results by domain name in your browser (such as Microsoft Internet Explorer) instead of the path of the URL, it limits the flexibility of the PAC standard. Alternatively, you can disable caching of proxy auto- configuration results by editing the registry.

It is recommended to always use IP addresses instead of host domain names in the isInNet function for compatibility with other Windows components that make use of the Internet Explorer PAC settings, such as .NET 2.0 Framework. For example,

if (isInNet(host, dnsResolve(sampledomain) , "255.255.248.0"))

// .NET 2.0 will resolve proxy properly

if (isInNet(host, sampledomain, "255.255.248.0"))

// .NET 2.0 will not resolve proxy properly

The current convention is to fail over to the direct connection when a PAC file is unavailable.

When switching quickly between network configurations (for example, when entering or leaving a VPN), dnsResolve may give outdated results due to DNS caching.

For instance, Firefox usually keeps 20 domain entries cached for 60 seconds. This may be configured via the network.dnsCacheEntries and network.dnsCacheExpiration preference variables. Flushing the system’s dns cache may also help, (such as by using the sudo service dns-clean start in Linux).