# Engines return different results for the same URL

Source: https://findproxyforurl.net/rules/engine-divergent-result/ · last updated 2026-10-12

Rule PAC-K012 (`engine-divergent-result`), severity info, category: Compatibility across engines.

The same test URL produced different proxy decisions under different engine profiles (for example because Chromium strips the path from https URLs, or because an engine lacks a helper). The PAC's behaviour depends on which client runs it.

## Why it matters

Most divergences trace back to a specific rule in this catalogue: URL path matching on
https (PAC-C001), case handling (PAC-K009), Ex functions (PAC-K003), ES level (PAC-K001),
unported proxies (PAC-X013). This finding reports the observed effect so that the author
can see which URLs are affected and which engines disagree. A PAC that behaves identically
on all target engines is one of the conditions for A+.


## How to fix

Follow the specific finding named in the message; the divergence disappears when the engine-dependent construct is removed.

## Bad

```js
function FindProxyForURL(url, host) {
  if (shExpMatch(url, "*/intranet/*")) {
    return "DIRECT";
  }
  return "PROXY proxy.corp.example:8080";
}
```

## Good

```js
function FindProxyForURL(url, host) {
  if (host == "intranet.corp.example") {
    return "DIRECT";
  }
  return "PROXY proxy.corp.example:8080";
}
```

## Engine behaviour

- chromium >=52: Path and query of https URLs are not visible to the PAC (since Chrome 52); a user name and password are removed for every scheme. (source: lab, verified 2026-10-12)
- firefox: Path and query are not visible to the PAC for any scheme; a user name and password before the host are visible. (source: lab, verified 2026-10-12)
