Skip navigation
McAfee Secure sites help keep you safe from identity theft, credit card fraud, spyware, spam, viruses and online scams
616 Views 2 Replies Latest reply: Jul 26, 2013 6:35 AM by eelsasser RSS
feickholt Apprentice 51 posts since
Nov 16, 2012
Currently Being Moderated

Jul 25, 2013 3:27 AM

PAC File Caching?

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)

Thanks
Frank

  • tyger McAfee Employee 22 posts since
    Apr 15, 2013
    Currently Being Moderated
    1. Jul 26, 2013 4:51 AM (in response to feickholt)
    Re: 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

  • eelsasser McAfee SME 842 posts since
    Mar 24, 2010
    Currently Being Moderated
    2. Jul 26, 2013 6:35 AM (in response to feickholt)
    Re: PAC File Caching?

    Yes. You can insert the cache control header as it is being delivered to client.

    Header.Add("Cache-Control","max-age=XXXX")

     

    And the client will honor that value.

More Like This

  • Retrieving data ...

Bookmarked By (1)

Legend

  • Correct Answers - 5 points
  • Helpful Answers - 3 points