Google-chrome – How to force Chrome to reload proxy configuration file

firefoxgoogle-chromeosx-snow-leopardPROXY

I frequently move my laptop (OSX) between different wifi areas, but my home base has an ethernet connection and relies on my organisation's proxy.pac file. When reconnecting after a stint on the road, I often get a problem where pages simply don't load in Chrome or Firefox. They just eventually time out. I think this is related to the fact that the proxy requires username and password – perhaps it just discards unauthenticated requests or something.

I discovered by trial and error that in FireFox, if I go to the proxy settings, and press "reload" on the proxy configuration, then the problem goes away. Eventually Chrome will pop up the proxy authentication dialog, but it can be hard to see (usually comes up in the wrong Spaces window, sometimes disappears straight away, can be buried under other application windows etc).

So my question is: how can I tell Chrome to reload the proxy.pac file, since that works for Firefox? (I thought I had solved the problem by saving the proxy.pac file locally, but apparently not).

Best Answer

Welcome to the world of fun that is Proxy Auto-Configuration files (and indeed Google Chrome)!

You haven't seen anything, yet. Include more than just Chrome and Firefox in the mixture of WWW browsers, and one is in for a world of difficulty. (I recently tried to diagnose why a PAC file was causing RealPlayer to lose the ability to resolve any domain names at all.)

Useful diagnosis tools, where "useful" incorporates "I've used them myself to diagnose problems.", include Chrome's JavaScript console and debug logging function. I diagnosed a syntax error in a fairly large PAC file with that, once. The Chromium "Net Internals" proxy configuration reporting page (whose URL SuperUser doesn't allow as a hyperlink), and its initialization reporting counterpart (likewise), are also useful:

chrome://net-internals/proxyservice.config
chrome://net-internals/proxyservice.init_log

Yes, it is quite difficult to persuade Chrome to re-load a PAC file afresh. Chrome has had a fairly troubled history when it comes to proxy settings. One way to do it that is fairly reliable is to completely turn off all proxy settings in the system settings dialogue (and save that change, of course), wait for a minute, then turn them back on again. But in the past (with earlier versions) I have had to completely exit and restart Chrome. In part this is because Chrome works by polling for changes to the system settings every 10 or so seconds in the background when it is otherwise idle.

In Chrome's bug database you'll find that the request to allow run-time switchable Chrome-specific proxy settings like other WWW browsers have, which relates to your problem, languished for three years and was closed as "We won't fix this.", although there's now supposedly an extension (and a set of command-line options that are, of course, not run-time switchable).

As you've observed, Firefox has a simple "Reload" button. As you can see by reading the three years of bug discussion, this is an area where people are quite unhappy about how feature-poor and quirky Chrome is compared to Firefox.

Note that this might not be the root cause of your underlying problem, but since you haven't asked about that, let alone provided anywhere near enough details of it, I'm not going to address it. ☺

Related Question