Matthew_Goche_6
Feb 22, 2007Nimbostratus
Problems encouraging caching on the browser
We are a web-hosting site and we have an iRule setup to encourage caching on the client browsers. However, a lot of URIs that meet the iRule arguments are not being cached by clients running IE6.0. A specific URI that we are having trouble with is:
/imageserver/plumtree/common/private/js/jsutil/LATEST/PTUtil.js
Please let me know is there are any other considerations for this work. Some smaller files seem to be cached, but I know my cache limit is not the problem. Please let me know if you have any ideas.
The iRule is:
when HTTP_REQUEST priority 50 {
set cachetime 0
if {not ([HTTP::version] equals "1.1")} {
HTTP::header insert "x-httpversion" [HTTP::version]
log local0. "Access via [HTTP::version]"
}
switch -glob [string tolower [HTTP::path]] {
"/imageserver/plumtree/common/*" -
"/imageserver/plumtree/portal/private/*" -
"/imageserver/plumtree/portal/public/*" {
set cachetime $::twoweeks
}
"/imageserver/plumtree/portal/custom/*" {
set cachetime $::workday
}
"/imageserver/plumtree/portal/*" -
"/documents/*" {
set cachetime $::day
}
"/portal/server.pt/gateway/*.gif" -
"/portal/server.pt/gateway/*.css" -
"/portal/server.pt/gateway/*.js" -
"/portal/server.pt/gateway/*.jpg" -
"/portal/server.pt/gateway/*.png" {
set cachetime $::workday
}
"*.gif" -
"*.jpg" -
"*.png" {
set cachetime $::workday
}
"*.css" -
"*.js" {
set cachetime $::workday
}
default {
set cachetime 0
}
}
if {not($cachetime == 0)} {
HTTP::header remove "If-None-Match"
}
log local0. "URI is [HTTP::path], Cache time: $cachetime"
}