If you need to build a mobile app or mobile version of a website there are a number of libraries you can use to do it. Many of them work well but the problem is that as new browsers, devices and features come out, they need to be updated.
Detector, a simple PHP and JS browser/feature detection library actually adapts to newly released and browsers on its own. It doesn’t even need to pull from a central database with browser information.
It can be used to easily detect:
- User Agent
- Is Mobile?
- Is Mobile Device?
- Is Tablet?
- Is Computer?
- Is Spider?
Also, you can detect a huge number of CSS3 features, HTML5 features and more.
Using detector, you can serve the appropriate markup, stylesheets, and JS to a requesting browser without being completely dependent on a front-end-only resource loader nor a browser-detection library being up-to-date.
I’ll be experimenting with this on OD to see how I can improve the mobile UIX in the next few months. How will you use it?