Forum Discussion
earton_25699
Nimbostratus
Mar 21, 2009iRule for IE8
With the release of IE8 yesterday, I need to be able to automatically make users who have IE8 installed to be forced into an IE7 compatible mode. I have read some articles on Microsoft that details do...
Mar 24, 2009
Looks to me like the above config is for IIS and is just creating a custom response header for all requests. If you want to add this to all requests, regardless of the browser, it would be as simple as this:
when HTTP_RESPONSE {
HTTP::header insert "X-UA-Compatible" "IE=EmulateIE7"
}
If you want to only do this for IE8 browsers, you'll need to add a HTTP_REQUEST event and look at the value of [HTTP::header User-Agent] and if that matches IE8 (I don't have that value handy), then you could set a value that is read in the HTTP_RESPONSE to determine whether the header is added.
You also, might want to check if the header already exists in the response and only add it if it's not there already.
when HTTP_RESPONSE {
if { ! [HTTP::header exists "X-UA-Compatible"] } {
HTTP::header insert "X-UA-Compatible" "IE=EmulateIE7"
}
}
But, based on the config above, it's globally setting the header for all responses to the above iRule should work for you.
Let us know if this works out for you.
-Joe
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects