# Parameters not named url and host

Source: https://findproxyforurl.net/rules/nonstandard-parameter-names/ · last updated 2026-10-04

Rule PAC-B002 (`nonstandard-parameter-names`), severity info, category: Best practice and maintainability.

Engines pass the arguments by position, so function FindProxyForURL(u, h) works. Every document, example and reviewer assumes url and host; deviating names invite mix-ups between the two (PAC-C001).

## Why it matters

The two parameters are easy to confuse even with the standard names. Non-standard names
remove the one cue that tells a reader which string is which, and they defeat
pattern-based review tools that look for `host` and `url`. There is no benefit in renaming
them.


## How to fix

Declare function FindProxyForURL(url, host).

## Bad

```js
function FindProxyForURL(u, h) {
  if (isPlainHostName(h)) {
    return "DIRECT";
  }
  return "PROXY proxy.corp.example:8080";
}
```

## Good

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