proxy.pac file performance optimization

Posted by Tuinslak on Server Fault See other posts from Server Fault or by Tuinslak
Published on 2011-03-10T09:46:02Z Indexed on 2011/11/29 17:52 UTC
Read the original article Hit count: 381

Filed under:
|
|

I reroute certain websites through a proxy with a proxy.pac file.

It basically looks like this:

if (shExpMatch(host, "www.youtube.com"))
    { return "PROXY proxy.domain.tld:8080; DIRECT" }
if (shExpMatch(host, "youtube.com"))
    { return "PROXY proxy.domain.tld:8080; DIRECT" }

At the moment about 125 sites are rerouted using this method. However, I plan on adding quite a few more domains to it, and I'm guessing it will eventually be a list of 500-1000 domains.

It's important to not reroute all traffic through the proxy.

What's the best way to keep this file optimized, performance-wise ?

Thanks

© Server Fault or respective owner

Related posts about proxy

Related posts about JavaScript