- Configure a Web server that is named "Webserver" with two virtual folders: "/login" and "/test".
- Create the following PAC file:
function FindProxyForURL (url, host)
if shExpMatch (url, "http://webserver/login") return "DIRECT";
else return "PROXY myproxy:80; PROXY mybackupproxy:80";
- Configure Internet Explorer to use this PAC file.
- Start Internet Explorer and type the following Web address:http://webserver/loginInternet Explorer loads the PAC file and correctly uses a direct connection.
- When the logon page appears, type http://webserver/test. If you use Network Monitor, you can observe that access to "http://webserver/test" still uses a direct connection instead of one of the returned proxies.
If an automatic proxy configuration script is configured to be used and Internet Explorer is able to retrieve it from the network (either if the Automatically Detect Settings option or the Use automatic configuration script are enabled), the Automatic Proxy Result Cache is updated with the hostname being accessed and the complete set of proxy servers returned by parsing the script. In the example, any hostname that is determined to use a proxy server will have "PROXY myproxy:80; PROXY mybackupproxy:80" added to the Automatic Proxy Result Cache.
In this scenario, “myproxy” is used for any subsequent access to a cached hostname and the automatic proxy configuration script is not re-processed. If “myproxy” is suddenly inaccessible, the following happens:
- The “myproxy” proxy is added to the list of bad proxy servers.
- The “mybackupproxy” proxy is selected to serve the request for the hostname in question, taken from the Automatic Proxy Result Cache.
- If the connection is successful, “mybackupproxy” is used in subsequent requests to this hostname during the same browsing session.
This allows proxy failover to still occur even if the Automatic Proxy Result Cache is enabled but it does not allow you to specify a different proxy server for the same hostname but, for instances, for different URL’s, as illustrated in the example. If this is a requirement, then you may want to disable the Automatic Proxy Result Cache feature. This will result in client-side processing of every GET request that is issued by Internet Explorer. As a result, Internet Explorer performance may be impacted depending on the logic of the Automatic Proxy Configuration Script and its size. To disable the Automatic Proxy Result Cache, use one of the following methods.
Note If you disable automatic proxy caching, Internet Explorer performance may be affected.
Method 1: Modify the registryImportant This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
You can disable the Automatic Proxy Result Cache by using the following registry key:
Data value: 0 = disable caching; 1 (or key not present) = enable automatic proxy caching (this is the default behavior)
Method 2: Modify Group Policy settings
- Click Start, click Run, type gpedit.msc, and then click OK.
- In Group Policy Object Editor, double-click User Configuration\Administrative Templates\Windows Components\Internet Explorer.
- Double-click Disable caching of Auto-Proxy scripts.
- Click Enable, and then click OK.
For more information about the addition of the bad proxy server list, click the following article number to view the article in the Microsoft Knowledge Base:
ID článku: 271361 – Posledná kontrola: 11. 3. 2016 – Revízia: 1