isResolvable()
True if the host name resolves in DNS. The script waits for the resolver, which usually answers from a cache.
isResolvable(host) → booleanThe first call for a name sends a DNS query; later calls for the same name are answered from a cache until the stored answer expires (see DNS in PAC files). Used as an “am I on the internal network?” check, it still makes every request depend on DNS: outside the company network the internal DNS server cannot be reached, and each request waits for a timeout. Where DNS is split, the answer is simply wrong.
Example
// prefer explicit domain lists; if you must, guard it:
if (isPlainHostName(host) && isResolvable(host)) {
return "DIRECT";
}
Engine notes
| Engine | Behaviour | Source |
|---|---|---|
| chromium | Resolves IPv4 only. | code, verified 2026-10-04 |
| chromium | Uses the same table of names already resolved in this request as dnsResolve, and the same limit of 20 different names, so a repeat of the same name costs no lookup. | code, verified 2026-10-14 |
| winhttp | True for a name with an IPv4 address and for a short address form such as "10.1.2"; false for a name that does not exist. | lab, verified 2026-10-11 |
| winhttp | Keeps no table of names during one run. When the DNS server does not answer, every call waits about 12 s again. | lab, verified 2026-10-16 |
Availability
| Function | chromium | chromium | firefox | pacparser | pacparser | winhttp | wininet | reference |
|---|---|---|---|---|---|---|---|---|
isResolvable | yes | yes | yes | yes | yes | yes | yes | yes |