I have a general Question about PAC-File
We build dynamic Pac.-Files using the MWG.
We can see in our logfile that clients requests the file very often.
I thought the pac-file will be cached on the clients. Is this right?
Is there a way to influence the caching time? (60min might be enough) Maybe using some header varibales (Cache-Control..) ?
Are there different browser implementation for caching the pac-file? (IE,Firefox,Chrome)
most browsers should respect the cache fields in HTTP headers. Cache headers with a timeout of 1 hour (3600 seconds) should be added automatically if you serve proxy.pac using the file server feature of MWG 7, but that will only work for static content.
You can display the HTTP headers with curl (adapt the URL as appropriate). Check output for Cache-Control header (maxage=3600 specifies timeout value of 1 hour). Date header shows time on server, Expires header time when file will expire. Time difference should be 1 hour, too. Not sure how exactly you are creating dynamic pac files, but make sure you add those cache headers.
HTTP/1.1 200 OK
Expires: Fri, 26 Jul 2013 08:52:08 GMT
Last-Modified: Fri, 26 Jul 2013 07:51:31 GMT
Date: Fri, 26 Jul 2013 07:52:08 GMT