Saturday, 27 July 2013

PAC File Caching?

Hi,

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.

# curl -i http://MWG7APPLIANCE:4711/files/proxy.pac

HTTP/1.1 200 OK

Expires: Fri, 26 Jul 2013 08:52:08 GMT

Cache-Control: max-age=3600

Accept-Ranges: bytes

ETag: W/"0-1374825091000"

Last-Modified: Fri, 26 Jul 2013 07:51:31 GMT

Content-Type: application/x-ns-proxy-autoconfig

Content-Length: 0

Date: Fri, 26 Jul 2013 07:52:08 GMT

Server: mwg-ui

Cya, Ed


View the original article here

No comments:

Post a Comment