PHP如何检测jQuery mobile A级浏览器服务器端?
当电话不具有jQuery Mobile列出的"A级"支持时,我想从标题中排除jQuery Mobile JS库( http://jquerymobile.com/gbs/).我发现在旧的支持JS的Blackberry手机上,jQM框架将这些手机的速度提高到了蜗牛般的速度.
I want to exclude the jQuery Mobile JS library from my header when a phone does not have "A grade" support as listed by jQuery Mobile (http://jquerymobile.com/gbs/). I find that on old Blackberry phones (that support JS) the jQM framework grinds these phones to a snails speed.
作为一个例子,这些家伙在根据移动浏览器的支持来提供jQuery Mobile库和相关样式方面做得很好: demo.livebookings.biz
As an example these guys do a good job at serving up the jQuery Mobile library and associated styles depending on the mobile browser support: demo.livebookings.biz
如何实现类似的服务器端方法,以便可以根据移动浏览器的支持选择何时包括JS文件(例如jQM框架)和任何CSS文件.
How can I implement a similar server-side approach so that I can choose when to include JS files (e.g. jQM framework) and any CSS files as per the mobile browser support.
谢谢
jQM功能是客户端,有关此内容,请参见:
The jQM functionality is Client Side, More on this here:
gradeA 函数,该函数返回默认的布尔值:返回值
$.support.mediaquery
的函数
任何支持条件 必须满足该条件才能继续.
gradeA function that returns a boolean, default: a function returning the value of
$.support.mediaquery
Any support conditions that must be met in order to proceed.
对于服务器端,您需要类似
For Server Side you would need something like
- http://code.google.com/p/mobileesp/
- http://wurfl.sourceforge.net/
我以前使用过Mobile ESP,并取得了很好的效果.扩展/定制也很容易
I've used Mobile ESP before and have had great results with it. It's also easy to extend/customize