HOWTO: Stop a BlueCoat Caching Web-Proxy from Caching Your Site

| No TrackBacks
blue-coat-proxysg-800-series-800-2.jpgAt work, I sit behind a cluster of BlueCoat 800-2 Web Cache proxy appliances.  For security and efficiency, all of our outbound web-traffic is sent through this cluster.  This is fine, except that the BlueCoat appliances in this cluster do NOT obey the configuration guidelines in my robots.txt.  And, they unnecessarily ping many of the requested resources sent through them.  In other words, if you load a web-page using this web-proxy cluster, the cluster will continuously "ping" the site and its resources over and over again at a fixed interval.  I assume this is the cluster checking the site to see if anything has changed.  From a system administrators standpoint, this is slightly irritating because the extra "ping" adds to the load of the server and unnecessarily consumes bandwidth (the cluster appears to repeatedly request the same resources with a GET).

So, I took matters into my own hands and tweaked my root .htaccess file to block these pings with a 403 Forbidden.  Strangely enough, BlueCoat appliances appear to use an HTTP user-agent of "Mozilla/4.0 (compatible;)".  This is definitely not a legit user-agent string; the user-agent should identify the device that's making the request.  Lucky for me, this simplifies my .htaccess configuration a bit:

SetEnvIf User-Agent "^Mozilla\/4\.0 \(compatible\;\)$" block=1
Order allow,deny
Allow from all
Deny from env=block

And that, takes care of that.

Did You Find this Helpful?

Did you find this post helpful, or at least, interesting?

  

Send Mark a Direct Message

If you'd like to send me a direct message, please do so below. However, I do not publicly post comments or messages submitted directly to me. So, if you're going to try to SPAM me, or my blog, you're pretty much wasting your time.

400 characters remaining

Error

About Mark

A Silicon Valley native, Mark Kolich is a full-time Software Engineer, a casual entrepreneur, and a consultant for hire. A web technologies expert, his current focus is on building powerful and robust cloud-driven web-applications using Java, PHP, Perl, AJAX, DHTML, CSS, and JavaScript. His favorite programming languages are PHP, Java and JavaScript. He uses Linux, enjoys biking to work, loves building great software, and always writes elegant, readable, and maintainable code.

No TrackBacks

No trackbacks attached to this entry.

Twitter (@markkolich)

Translate

About this Entry

This page contains a single entry by Mark Kolich published on March 16, 2009 9:19 AM.

Added A Google Translate Widget to my Movable Type Blog was the previous entry in this blog.

HOWTO: SHA1withRSA Digital Signing in PHP is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.