I want to implement jQuery Mobile, but only for mobile browsers.
Is there a si开发者_如何学Cmple User Agent detection function that takes a User Agent string and returns true/false based on whether the browser should get a normal website or a mobile website?
This would basically be regular expression matching and programming language agnostic. But I would be using this in Ruby on Rails, PHP, or Cold Fusion on the server-side and in JavaScript on the client-side.
This may be of some help:
http://detectmobilebrowser.com/
Also this, http://mobiforge.com/developing/blog/deviceatlas-jquerymobile which apparently actually detects support for JQM-capable browsers. Unfortunately its not free!
精彩评论