Flush the PAC cache: what Windows, Chrome, Edge, Firefox and macOS keep
A fixed PAC file or wpad record often seems to have no effect because the client still uses what it found before. ipconfig /flushdns alone does not help, because it empties only the DNS cache. Each engine keeps its own copy of the discovery result and of the script, and each is cleared in its own way. This page lists them one by one.
A PAC file (proxy auto-configuration file) and the WPAD search that finds it are both kept for a while by the client. That is good for speed, but while you test a fix it hides the result. The hub page WPAD not loading puts this check last, after the record, the server and the file are known to be right.
What each layer keeps at a glance
| Layer | What it keeps | How to clear it |
|---|---|---|
| Windows DNS client | names and addresses, including wpad | ipconfig /flushdns |
| WinHTTP Auto-Proxy service (Windows services, many programs) | the PAC URL found by WPAD and the script | change of IP address, or reboot |
| WinINet (older Windows programs) | the answer of the script per host | restart the program |
| Chrome and Edge | the proxy settings, the PAC URL and the script | Re-apply settings in net-internals, or restart the browser |
| Firefox | the script | Reload in the connection settings, or restart Firefox |
| macOS | the system proxy settings and DNS | restart the program; sudo killall -HUP mDNSResponder for DNS |
ipconfig /flushdns empties only the DNS cache
Microsoft describes the switch as: “Flushes and resets the contents of the DNS client resolver cache” (source:
doc, Microsoft ipconfig,
checked 2026-10-13). That helps when the wpad record itself changed, because the client would otherwise
keep the old address. It does not make any engine search for the PAC file again, and it does not discard a
script that was already loaded.
The WinHTTP Auto-Proxy service keeps the result until the IP address changes
Windows services and many programs leave the PAC work to the WinHTTP Auto-Proxy service
(WinHttpAutoProxySvc). Microsoft writes that “the cached autoproxy URL and script are available to the whole
computer”, and that “typically, the autoproxy script and URL are cached until the IP address associated with
the computer changes” (source: doc,
WinHTTP AutoProxy cache, checked
2026-10-13).
The failed case is kept as well. In our measurements on Windows 11 25H2, after a WPAD search that found
nothing, every later request got error 12180 (ERROR_WINHTTP_AUTODETECTION_FAILED) at once, without a new
DHCP or DNS question. That stopped only when the computer’s IP address changed (source: lab, 2026-10-11).
How to clear it:
- Change the IP address, for example by connecting to another network, or reboot.
- If your Windows lets you restart the service, run
Restart-Service WinHttpAutoProxySvcin an elevated PowerShell. If the command is refused, reboot. Do not disable the service: Microsoft’s guidance is “Do not disable”, because “anything that uses the network stack can have a functional dependency on this service” (source: doc, Microsoft: guidelines for system services in Windows Server, checked 2026-10-13). - Programs can clear it themselves with the function
WinHttpResetAutoProxy, using the flagsWINHTTP_RESET_ALLandWINHTTP_RESET_OUT_OF_PROC. Microsoft notes that there must be at least 30 seconds between two calls, or the reset may not happen (source: doc, WinHttpResetAutoProxy, checked 2026-10-13). Windows has no command line tool for this;netsh winhttp reset proxyresets the WinHTTP proxy setting to direct, which is something else.
WinINet keeps the answer per host
Older Windows programs use WinINet, the network library behind Internet Options. Microsoft documented that
WinINet keeps “the hostname being accessed and the complete set of proxy servers returned by parsing the
script”, so a host that was once answered keeps that answer while the program runs. The cache can be switched
off with the registry value EnableAutoproxyResultCache = 0 under
HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings, or with the policy
“Disable caching of Auto-Proxy scripts” (source: doc, Microsoft KB 271361, “How to disable automatic proxy
caching in Internet Explorer”, now only in an
archived copy).
While testing, close and restart the program.
Chrome and Edge: Re-apply settings in net-internals
Open chrome://net-internals/#proxy (in Edge edge://net-internals/#proxy) and press Re-apply settings.
The button asks the browser to load its proxy configuration again. Clear bad proxies next to it forgets
proxies that the browser marked as not working (source: code,
net_internals_ui.cc,
checked 2026-10-13). Restarting the browser has the same effect.
Without your help, Chromium loads the PAC file again two seconds after a change of IP address. It checks a working script for changes every 12 hours, and after a failure it tries again after 8 seconds, 32 seconds, 2 minutes and then every 4 hours (source: code, configured_proxy_resolution_service.cc, checked 2026-10-13). It fetches the file without the browser’s HTTP cache, so clearing the browsing data does not matter for the PAC file (source: code, pac_file_fetcher_impl.cc).
Firefox: Reload in the connection settings
In Firefox’s settings, search for “proxy” and open the connection settings. Next to Automatic proxy configuration URL there is a Reload button: “The reload button will load the currently available proxy configuration” (source: doc, Mozilla Support: connection settings in Firefox, checked 2026-10-13). Restarting Firefox also loads the file again.
Firefox loads the PAC file again after a network change, after a delay of 2 seconds (the preference
network.proxy.reload_pac_delay). After a failed load it tries again after 5 seconds, doubling the wait up to
5 minutes. It fetches the file past its HTTP cache, and it does not fetch a working file again on a timer
(source: code, nsPACMan.cpp and
nsProtocolProxyService.cpp,
checked 2026-10-13).
macOS: check the settings and flush DNS
Apple documents no command that reloads the PAC file. What you can do:
scutil --proxyshows the proxy settings the system uses at this moment, for exampleProxyAutoConfigURLStringandProxyAutoDiscoveryEnable(source: code, Apple scutil man page).sudo killall -HUP mDNSResponderresets the DNS cache (source: doc, Apple: reset the DNS cache).- Restart the program you test with. Chrome and Firefox on macOS follow their own rules above.
Cache-Control decides how long some clients keep the file
For the next change, send an explicit Cache-Control: max-age=… with the PAC file so that you know how long a
change takes, and keep it at a day or less (PAC-D003,
PAC-D005). Chrome and Firefox do not use the HTTP cache for the PAC file, as
shown above, but other clients may.
Frequently asked questions
Does ipconfig /flushdns clear the PAC cache?
No. Microsoft describes it as flushing the DNS client resolver cache and nothing else. The WinHTTP Auto-Proxy service and the browsers keep the discovered PAC URL and the script on their own. Use it only together with the steps for the engine you test.
How do I flush the PAC cache in Chrome or Edge?
Open chrome://net-internals/#proxy (in Edge edge://net-internals/#proxy) and press Re-apply settings. That makes the browser load the proxy settings again. Restarting the browser does the same.
How do I reload the PAC file in Firefox?
Open the connection settings (search for proxy in Firefox's settings) and press Reload next to the automatic proxy configuration URL. Firefox also loads the file again two seconds after a network change.
How do I make Windows look for wpad.dat again?
Microsoft documents that WinHTTP keeps the PAC URL and the script until the computer's IP address changes. Connect to another network or reboot. In our measurements Windows kept answering that no PAC file exists after a failed search, until the IP address changed.
How long does Chrome keep a PAC file?
Chromium loads the file again after every change of IP address, and it checks a working script for changes every 12 hours. After a failure it tries again after 8 seconds, 32 seconds, 2 minutes and then every 4 hours. It does not take the file from the HTTP cache.