Forum Discussion

Scott_87636's avatar
Scott_87636
Icon for Nimbostratus rankNimbostratus
Jun 14, 2013

Browser Detection

Does anyone have samples of a rule to determine the Browser and version the client is using? The theory is that for a few of our applications they can only run on a certain browser(s) and its level(s). I would like to determin the browser and then decide if we will allow the F5 continue to route to the login screen or post a popup to say you are not on a supported browser etc...

 

1 Reply

  • Perhaps something like this to start with:

    
    when HTTP_REQUEST {
        if { [class match [string tolower [HTTP::header User-Agent]] contains user_agent_datagroup] } {
             client user agent is in the list
            ....
        }
    }
    

    Then you'd create a simple string-based data group with (lowercased) User-Agent patterns that you wanted to accept.