Skip to content
HTTP_USER_AGENT browser detection plugin for ExpressionEngine
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Expressionengine plugin which detects browser based on HTTP_USER_AGENT.


There are a few similar plugins floating around out in the wild, some of which detect a larger number of browsers.

I've tailored this plugin for my own particular needs, with a focus on identifying Internet Explorer versions, while limiting Webkit/Gecko/Presto detection to popular browsers only. I simply have no need to identify browsers like Camino, MicroB, or iCab, and am okay with these being reported by their WebKit and Gecko fallbacks.

If you need more granular detection for obscure browsers, feel free to fork this plugin or look at some of the other options out there.


Copy the "browser_detect" folder to your /system/expressionengine/third_party (EE2) or /system/user/addons (EE3) folder.


Use the {exp:browser_detect:browser} tag to output browser identifier.

Use the {exp:browser_detect:family} tag output browser family.

Generally speaking, I tend to use this plugin in conjunction with standard EE conditionals to control the loading of browser specific stylesheets and javascript.


{if '{exp:browser_detect:browser}' == 'IE8'}
{if '{exp:browser_detect:family}' == 'IE'}


Internet Explorer

  • IE11 (relies on Trident/7.0 in user agent string for the time being to get around Microsoft's deliberate attempt to make IE11 appear as Gecko)
  • IE10
  • IE9
  • IE8
  • IE7
  • IE6
  • IE (used as a fallback)


  • Crome
  • Safari
    • iPad
    • iPhone
  • WebKit (used as a fallback)


  • Firefox
  • Gecko (used as a fallback)


  • Presto (all Opera/Presto browsers will return Presto)
You can’t perform that action at this time.