Forum Discussion

Stuart_250911's avatar
Stuart_250911
Icon for Nimbostratus rankNimbostratus
Nov 24, 2016

Client Broswer check

Hi, I have an application that requires client browser checking and the client's restriction is for IE 8 and above only. I thought I could use expr {[mcget {session.client.type}] == "IE" && [mcget {session.client.version}] >= "9" }

 

but this doesn't work and fails all versions, I eventually got this working with the following for IE 11 only but can't seem to be able to add more versions expr {[mcget {session.client.type}] == "IE" && [mcget {session.windows_info_os.last.ie_version}] contains"IE11" }

 

Has anyone got a working solution for this?

 

2 Replies

  • Lucas_Thompson_'s avatar
    Lucas_Thompson_
    Historic F5 Account

    Examine the raw session variable data from your clients. User-Agents from browsers vary as new versions and patches are released.

     

  • Hi,

    Each version of IE can have many different useragents associated: (http://www.useragentstring.com/pages/useragentstring.php?name=Internet+Explorer).

    If you want to only allow IE version 8 and above, maybe you could look that the user agent contains "MSIE 8.0" (for IE 8), "MSIE 9.0" (for IE 9), "MSIE 10.0" (for IE 10), "MSIE 10.6" (for IE 10.6) and "rv:11.0" (for IE 11). These should only exist in the relevant versions.

    To use them, try:

    expr { [mcget {session.user.agent}] contains "MSIE 8.0" || [mcget {session.user.agent}] contains "MSIE 9.0" || [mcget {session.user.agent}] contains "MSIE 10.0" } || [mcget {session.user.agent}] contains "MSIE 10.6" } || [mcget {session.user.agent}] contains "rv:11.0" }

    May require a bit of trial and error!