Showing results for 
Search instead for 
Did you mean: 
Level 10

Dynamic PAC-File by Webgateway and Returncode 304


we use our Webgateway to dynamically create the Pacfile for the clients.

Now we saw a lot of requests by the clients (up to 10 / sec) which were answered by the proxy with RC 304. (Not Modified)

Is there any way to deliver the file with 200 (including the whole file)? It seems the Client does not probably handle the 304 RC or

the client does not store the pac file in it's cache.

Sending the Pacfile again with RC200 might reduce the PAC file requests dramatically. (We saw more than 10% PAC Requests of 400 req/s)


0 Kudos
1 Reply
Level 9

Re: Dynamic PAC-File by Webgateway and Returncode 304

I advise customers to use the HTTP.GenerateResponse event. In a single rule you can populate the body from a use-defined property which has your proxypac content (either static or dynamically built by preceding rules), then add any http cache headers you need with the Header.Response.Add event(s). Sample attached. By the way, criteria is only on requests to the proxy.pac, which I check at the ruleset level already! As a prerequisite you only need a proxy listener on port 80, and - unlike if using the file server on port 4713 and forwarding rules - no dummy file is needed on the MWG, so the whole thing sync's across your MWGs via the policy.

Screen Shot 2017-04-28 at 18.30.43.png

0 Kudos