in transparent mode.
#
-# $Id: cf.data.pre,v 1.199 2000/11/01 04:03:14 wessels Exp $
+# $Id: cf.data.pre,v 1.200 2000/12/09 00:09:04 wessels Exp $
#
#
# SQUID Internet Object Cache http://squid.nlanr.net/Squid/
This is currently work in progress.
DOC_END
+NAME: ie_refresh
+COMMENT: on|off
+TYPE: onoff
+LOC: Config.onoff.ie_refresh
+DEFAULT: off
+DOC_START
+ Microsoft Internet Explorer up until version 5.5 Service
+ Pack 1 has an issue with transparent proxies, wherein it
+ is impossible to force a refresh. Turning this on provides
+ a partial fix to the problem, by causing all IMS-REFRESH
+ requests from older IE versions to check the origin server
+ for fresh content. This reduces hit ratio by some amount
+ (~10% in my experience), but allows users to actually get
+ fresh content when they want it. Note that because Squid
+ cannot tell if the user is using 5.5 or 5.5SP1, the behavior
+ of 5.5 is unchanged from old versions of Squid (i.e. a
+ forced refresh is impossible). Newer versions of IE will,
+ hopefully, continue to have the new behavior and will be
+ handled based on that assumption. This option defaults to
+ the old Squid behavior, which is better for hit ratios but
+ worse for clients using IE, if they need to be able to
+ force fresh content.
+DOC_END
+
EOF
/*
- * $Id: client_side.cc,v 1.515 2000/12/08 23:58:08 wessels Exp $
+ * $Id: client_side.cc,v 1.516 2000/12/09 00:09:04 wessels Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
request_t *request = http->request;
const HttpHeader *req_hdr = &request->header;
int no_cache = 0;
-#if defined(USE_USERAGENT_LOG) || defined(USE_REFERER_LOG)
const char *str;
-#endif
request->imslen = -1;
request->ims = httpHeaderGetTime(req_hdr, HDR_IF_MODIFIED_SINCE);
if (request->ims > 0)
if (request->cache_control)
if (EBIT_TEST(request->cache_control->mask, CC_NO_CACHE))
no_cache++;
+ /* Work around for supporting the Reload button in IE browsers
+ * when Squid is used as an accelerator or transparent proxy,
+ * by turning accelerated IMS request to no-cache requests.
+ * Now knows about IE 5.5 fix (is actually only fixed in SP1,
+ * but we can't tell whether we are talking to SP1 or not so
+ * all 5.5 versions are treated 'normally').
+ */
+ if (Config.onoff.ie_refresh) {
+ if (http->flags.accel && request->flags.ims) {
+ if ( (str = httpHeaderGetStr(req_hdr, HDR_USER_AGENT)) ) {
+ if (strstr(str, "MSIE 5.01") != NULL)
+ no_cache++;
+ else if (strstr(str, "MSIE 5.0") != NULL)
+ no_cache++;
+ else if (strstr(str, "MSIE 4.") != NULL)
+ no_cache++;
+ else if (strstr(str, "MSIE 3.") != NULL)
+ no_cache++;
+ }
+ }
+ }
+
if (no_cache) {
#if HTTP_VIOLATIONS
if (Config.onoff.reload_into_ims)
/*
- * $Id: structs.h,v 1.365 2000/12/08 23:58:09 wessels Exp $
+ * $Id: structs.h,v 1.366 2000/12/09 00:09:04 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
#endif
int log_ip_on_direct;
int authenticateIpTTLStrict;
+ int ie_refresh;
} onoff;
acl *aclList;
struct {