Main Page

Netscape Navigator 3.0 and Internet Explorer 3.0

The user-agent string provides a lot of information about a Web browser, including the browser name
and version. This is why Web site traffic evaluation software uses the user-agent string to determine how
many of your visitors are using a particular browser or operating system. The following table displays
some common browsers and their user-agent strings
Browser
User-Agent String
Internet Explorer 6.0
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
(Windows XP)
Mozilla 1.5
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5)
(Windows XP)
Gecko/20031007
Firefox 0.92
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7)
(Windows XP)
Gecko/20040707 Firefox/0.8
Opera 7.54
Opera/7.54 (Windows NT 5.1; U)
(Windows XP)
Safari 1.25
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en)
(MacOS X)
Apple-WebKit/124 (KHTML, like Gecko) Safari/125.1
Just a quick look at these user-agent strings reveals a lot about the browsers that are generating them.
Also, you may notice just how different each browser ’s user-agent string is. Opera’s user-agent string is
pretty short whereas Safari’s is extremely long. You may also notice that Internet Explorer ’s user-agent
string looks suspiciously like Mozilla’s, and Safari’s says
like Gecko
. The history of how user-agent
strings developed is a very revealing journey into how browsers have developed over the years.
A (Not So) Brief History
of the User-Agent String
Before you delve into user-agent detection, you should understand why the detection script looks for cer-
tain parts of a user-agent string. Understanding user-agent strings can be very difficult without under-
standing why and how they developed. This section takes a look into the evolution of user-agent strings
from early browser, such as Netscape Navigator 3.0, through modern-day browsers, such as Safari.
Netscape Navigator 3.0 and Internet Explorer 3.0
The browser that spearheaded the popularity of the Web was Netscape Navigator 3.0, which was
released around 1996. The code name of the Netscape engine was
Mozilla
, and the user-agent string had
a very simple format:
Mozilla/
AppVersion
(
Platform
;
Security [
;
OS-or-CPU-Description]
)
For example, Netscape Navigator 3.0 running on Windows 95 would have the following user-agent string:
Mozilla/3.0 (Win95; I)
227
Browser and Operating System Detection
11_579088 ch08.qxd 3/28/05 11:38 AM Page 227


JavaScript EditorFree JavaScript Editor     Ajax Editor


©