如何使用JSP / Java来检测手机(iOS和Android)?如何使用、手机、JSP、Java

2023-09-07 11:59:25 作者:最好看好听的精选

只是想知道如果任何人有碰到过这个?

Just wondering if anyone has come across this?

基本上,即时通讯寻求检测的iOS和Android使用JSP,并能够有条件CSS和JS文件添加到页面。

Basically, Im looking to detect for iOS and Android using JSP and to be able to conditionally add CSS and JS files to the page.

任何想法?

推荐答案

最好的办法很可能是与用户代理字符串。实际上,有一个pretty类似的问题已经SO,至少适用于iOS / Safari浏览器。请注意,有iOS上的其他浏览器,所以你需要寻找自己的用户代理字符串为好。

Best way would probably be with the User Agent string. There's actually a pretty similar question on SO already, at least for iOS/Safari. Note that there are other browsers on iOS so you will need to look for their user agent strings as well.

UA的金润串上市本网站。

How我使用PHP检测移动Safari浏览器服务器端?