我目前正在使用这个来检测访问者是否安装了Flash,如果没有,我就立即假定他们是iPhone用户,但现在似乎它并不总是像我希望的那样工作,因为有时他们会被重定向到我的网站的Flash版本,有时已经安装了Flash的人也会被重定向到我的网站的iPhone版本
<!DOCTYPE html>
<html>
<head>
<script src="http://www.featureblend.com/flash_detect_1-0-4/flash_detect.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
if(!FlashDetect.installed){
window.location = "?flash=false";
}else{
window.location = "?flash=true";
}
</script>
</head>
问题是如何检测是否为iPhone/iPad/iPod/AppleTV等设备,并将其重定向到flash=false的URL,如果不是上述设备,则重定向到flash=true?
我已经尝试过寻找,但真的找不到我要找的东西。
谢谢大家,祝大家圣诞快乐。