by Don_HH2K » Tue 25 Jul, 2006 7:21 am
The problem with this script is that navigator.appName on a Gecko-based product such as Firefox will return "Netscape", and navigator.appVersion will return "5.0".
- Code: Select all
if(window.navigator.product) {
document.write(window.navigator.vendor + " " + window.navigator.vendorSub)
}
else {
document.write(navigator.appName + " " + navigator.appVersion)
}
This used to work on Mozilla-based products to return the proper product name, though it seems to be broken in recent releases.
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.0.4) Gecko/20060516 Donzilla/1.1 (WML/1.3)
Laptop: HP Compaq nx6325 - Turion 64 X2 @ 2GHz, 2GB DDR2, 100GB HD, ATI Radeon X300, 15" LCD, Seven Pro
Handheld: Palm Treo 650 - Intel PXA270 @ 312MHz, 10MB RAM, 32MB flash, 2.7" LCD, Palm OS 5.4