練功房推薦書單

  • 猛虎出柙雙劍合璧版--最新 OCA / OCP Java SE 7 Programmer 專業認證 (電子書)
  • 流浪教師存零股存到3000萬(全新增修版)(書+DVD)
  • 開始在關西自助旅行(京都‧大阪‧神戶‧奈良)(全新增訂版)
  • 不敗教主的300張股票存股術

用戶端環境(瀏覽器軟體版本、安裝Plugin軟體、作業系統等)偵測 RSS feed
討論區首頁 » 網頁程式設計 Web Development
發表人 內容
andowson

七段學員
[Avatar]

註冊時間: 2007/1/2
文章: 718
來自: 台北
離線
Using the navigator object to detect client's browser
JavaScript - Browser detect

Java Plugin Detector

jQuery browser plugin detection 1.0.2可以偵測瀏覽器是否支援下列物件
Flash
Silverlight
PDF(checks if pdf mimetype is supported not limited to one PDF application)
Java
Quicktime
Windows Media Player
Shockwave
Real player

OS 版本判別

<script type="text/javascript">
<!--
// source: http://www9.plala.or.jp/oyoyon/html/script/platform.html
function detectOS() {
var os, ua = navigator.userAgent;
if (ua.match(/Win(dows )?NT 6\.1/)) {
os = "Windows 7"; // Windows 7
}
else if (ua.match(/Win(dows )?NT 6\.0/)) {
os = "Windows Vista"; // Windows Vista
}
else if (ua.match(/Win(dows )?NT 5\.2/)) {
os = "Windows Server 2003"; // Windows Server 2003
}
else if (ua.match(/Win(dows )?(NT 5\.1|XP)/)) {
os = "Windows XP"; // Windows XP
}
else if (ua.match(/Win(dows )? (9x 4\.90|ME)/)) {
os = "Windows ME"; // Windows ME
}
else if (ua.match(/Win(dows )?(NT 5\.0|2000)/)) {
os = "Windows 2000"; // Windows 2000
}
else if (ua.match(/Win(dows )?98/)) {
os = "Windows 98"; // Windows 98
}
else if (ua.match(/Win(dows )?NT( 4\.0)?/)) {
os = "Windows NT 4.0"; // Windows NT 4.0
}
else if (ua.match(/Win(dows )?95/)) {
os = "Windows 95"; // Windows 95
}
else if (ua.match(/Mac|PPC/)) {
os = "Mac OS"; // Macintosh
}
else if (ua.match(/Linux/)) {
os = "Linux"; // Linux
}
else if (ua.match(/(Free|Net|Open)BSD/)) {
os = RegExp.$1 + "BSD"; // BSD
}
else if (ua.match(/SunOS/)) {
os = "Solaris"; // Solaris
}
else {
os = "Unknown"; // Other OS
}
return os;
}
// -->
</script>

http://en.wikipedia.org/wiki/Microsoft_Windows#Timeline_of_releases

彈跳視窗支援/快顯封鎖程式偵測(Google, Yahoo, MSN工具列)
https://stock2.ubot.com.tw/ServiceProvider/WebTest/Default2.aspx

偵測Proxy=>檢查Header的HTTP_X_FORWARDED_FOR是否為空值
http://www.study-area.org/coobila/tutorial_320.html

分享經驗 累積智慧
[WWW]
 
討論區首頁 » 網頁程式設計 Web Development
前往:   
行動版