I was browsing the ESPN.com source code recently and stumbled upon their method of detecting iPhone / iPod touch users and redirecting them to their iPhone-compatible website.
我最近在浏览ESPN.com源代码,偶然发现了他们检测iPhone / iPod touch用户并将其重定向到其iPhone兼容网站的方法。
The code itself is short and sweet. I, however, would prefer using the server-side method of user agent checking.
代码本身简短而甜美。 但是,我更喜欢使用服务器端的用户代理检查方法。
Which would you prefer?
你更喜欢哪个?
翻译自: https://davidwalsh.name/detect-iphone
相关资源:jdk-8u281-windows-x64.exe