View Full Version : detect Mozilla browser ?
Alias
05-18-2003, 04:26 PM
hello people
is it possible to detect Mozilla browser ?
something like:
if (IE)
{
iedothis()
}
if (Netscape)
{
nsdothis()
}
if (Mozilla)
{
modothis()
}
best regards
if (navigator.product == "Gecko") {
// a Gecko-based browser
}
should suffice I'd imagine. I assume when you mean Mozilla that you also mean Netscape 6, Netscape 7, Beonex, K-meleon, Chimera, Firebird/Phoenix, etc.
Alias
05-18-2003, 07:51 PM
hello jkd
well, no ... i mean only on Mozilla browser (mozilla.org)
(no Netscape browsers 4,6,7)
But Netscape 6.01 IS Mozilla 0.9...4??, and Netscape 7 IS Mozilla 1.01.
liorean
05-18-2003, 10:41 PM
There's no really good way to single out Mozilla only (not other browsers built upon it, such as Phoenix/Firebird, Netscape>5, etc.)
You can single out the early versions, though...
See this User-Agent string? "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030507"
Try searching for /rv:(0[\d\.]+||1\.0)/i.
That will match all branched Mozilla derivates. I suggest you let through all others - the next Camino and Netscape 7.1 (or 7.5 depending on what naming convention they chose) will be based on the 1.4 branch. Mozilla Phoenix/Firebird is a trunk build, and doesn't differ in any relevant way from the Mozilla Application Suite. In fact, Navigator and Messenger in the Mozilla Application Suite are going to be replaced by Mozilla Firebird and Mozilla Thunderbird (To-be components Mozilla Browser and Mozilla Mail/News in the Application Suite) in 1.5 and following, in preparation for the pre-production development of Mozilla 2.0.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.