A PAC script uses JavaScript syntax. That does not mean it runs inside a web page.

The proxy resolver supplies an execution environment with routing inputs and helper functions. It does not promise a page's window, document, DOM, or navigator.appName. A browser-identification snippet copied from a page can therefore fail before your proxy rule returns anything.

Base the route on supported information such as the supplied URL and hostname, or on a documented helper where the network policy needs it. Do not infer a browser version from incidental JavaScript-engine quirks and make that inference decide the exit.

If different managed clients really need different policies, deliver the intended configuration through their management system. Firefox enterprise policy is one delivery option for managed Firefox installations. That is clearer than embedding an undocumented browser-detection puzzle inside the shared PAC file.

A script that parses successfully as ordinary JavaScript is not necessarily a supported PAC script. Check the resolver's documented environment, not just the language syntax.

Erthyglow kevrennek