With the initial release of Yiibu's Profile, Detector is already YABFDL (Yet Another Browser- and Feature-Detection Library). Ever since I heard Yiibu's talk, Adaptation, the core concepts & features of Detector have been floating around in my head. I've finally turned those ideas into code and created this demo. To learn more about Detector and how it works please check out the README on GitHub.

Both of the following Detector profiles were created from a default, conservative profile because it appears JavaScript or Cookies are turned off and Detector didn't recognize the user-agent.

Your Detector Browser Profile

The following browser profile was created using ua-parser-php. This information is derived solely from the user agent string for your browser.

Browser Properties
User Agent: CCBot/2.0 (http://commoncrawl.org/faq/)
UA Hash: c4ce282ba646690265c3201d3e318e0e
Device: Spider
Is Mobile? false
Is Mobile Device? false
Is Tablet? false
Is Computer? false
Is Spider? true

Something wrong with this profile? Please, let me know. Note that the "tablet" classification may be incorrect for those Android tablets using an OS older than Android 3.0.

Your Detector Feature Profile

The following feature profile was primarily created using Modernizr's core tests. The left column of results, Your Browser, is populated by JavaScript using a copy of Modernizr that is loaded with this page. The right column, Detector Profile, is populated by PHP using the profile created by Detector for your browser. In addition to the core tests I've added an extended test that checks for emoji support as well as a per request test to check the device pixel ratio. Both were added using the Modernizr.addTest() Plugin API. To learn more about core, extended, and per request tests please review the README. To access any of these options in your PHP app you'd simply type $ua->featureName.

Feature Profile Properties
coreVersion: 0.95
family: desktop
To learn more about families please review the family tutorial.
CSS3 Features Your Browser Detector Profile
Detector wasn't able to capture these features because they rely on a cookie that was set after the PHP script ran.
HTML5 Features Your Browser Detector Profile
Detector wasn't able to capture these features because they rely on a cookie that was set after the PHP script ran.
Misc. Features Your Browser Detector Profile
nocookies: false
While a device may be touch-based that doesn't not mean it supports touch events which is what I'm testing for here.
Browser Class via Media Queries Your Browser Detector Profile
Detector wasn't able to capture these features because they rely on a cookie that was set after the PHP script ran.
This feature needs some love as it's not always returning information correctly.
Detector Extended Test Features Your Browser Detector Profile
extendedVersion:N/A1.0
To learn more about extended tests and their purpose please review the test tutorial.
Detector Per Session Test Features Your Browser Detector Profile
Detector wasn't able to capture these features because they rely on a cookie that was set after the PHP script ran.
To learn more about per session tests and their purpose please review the test tutorial.
Detector Per Request Test Features Your Browser Detector Profile
Detector wasn't able to capture these features because they rely on a cookie that was set after the PHP script ran.
To learn more about per request tests and their purpose please review the test tutorial. If this section isn't populated hit "refresh". Attributes are captured via a cookie. Screen size will also be one request behind if you resize the window for the same reason.

About Detector

Detector is a simple, PHP- and JavaScript-based browser- and feature-detection library that can adapt to new devices & browsers on its own without the need to pull from a central database of browser information.

Detector dynamically creates profiles using a browser's (mainly) unique user-agent string as a key. Using Modernizr it records the HTML5 & CSS3 features a requesting browser may or may not support. ua-parser-php is used to collect and record any useful information (like OS or device name) the user-agent string may contain.

With Detector a developer can serve the appropriate markup, stylesheets, and JavaScript to a requesting browser without being completely dependent on a front-end-only resource loader nor a browser-detection library being up-to-date.

Check out the README for more information as well as the full list of features.

Get the Code

Demos

Tutorials

More Information

Credits

Detector is based on Modernizr, modernizr-server, and the browser-detection library ua-parser-php. It also benefits from a healthy dose of inspiration from Yiibu's Profile.

Share This

Archive

The following 8007 user agent profiles are already in the system (readable list):

Fork Me on GitHub