开发者

Javascript .pac file

Is there a way to get a browser to read a .pac file without having the user manually point the browser's au开发者_StackOverflow社区tomatic config file at the URL?


Are you talking about Proxy Autoconfiguration?

Basically you have to configure a host name such as wpad.example.com and put the file there named as wpad.dat

See here: http://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol


If you are using Chrome then you can use the chrome switch --proxy-pac-url

For example:

Open cmd.exe as admin

Javascript .pac file

Make sure to first navigate to the path of Chrome (1st line) in cmd

Notice also that I used another chrome switch which is unsafe-pac-url this will allow your pac file to work for HTTPS requests, because otherwise chrome will only apply our PAC file to HTTP requests only.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜