User Agent

Updated: 10/30/2017 by Computer Hope

uaSometimes abbreviated as UA, the user agent is a browser text string that is given to each website you visit; containing information such as the browser version, compatibility, operating system, and any modifying plugins. Using this data, a website can assess the capabilities of your computer, optimizing a page's performance and display.

View your User Agent

User Agent examples with string explanation

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)

Mozilla/4.0 is used for historical reasons as stated by Microsoft, not to be confused with the variants of Mozilla browsers such as Firefox. Next, is the actual Microsoft Internet Explorer version: "compatible; MSIE 6.0;" which indicates this user has Internet Explorer 6.0. Next, "Windows NT 5.1; SV1;" is a description of the operating system, in this case Microsoft Windows XP with Service Pack 1. Finally, the .NET CLR 1.1.4322 is the .NET framework.

Note: A user agent string with Internet explorer can have multiple .NET versions.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20080325 Fedora/ Firefox/

In this second example, this user agent is on a Linux variant. The first thing noticeably different about this user agent is the X11; which is variant of X Windows, next U; is the encryption level, which is short for USA, an indication of strong encryption. In the past, different encryption versions had to be released for specific parts of the world because of laws in the United States. Next, i686; and Fedora/ describes the platform and OS. After that, en-US; is the language and location of the browser (English and US respectively). Finally, Firefox/ is the browser and its version.

Mozilla/5.0 (Macintosh; U; Intel macOS X 10.5; en-US; rv:1.9b4) Gecko/2008030317 Firefox/3.0b4

In this last example, the user agent is an Apple computer. This line has many similarities to the previous example, which is also running Firefox. However, the user agent is Macintosh with an Intel and macOS X 10.5; which is the processor type and operating system. Apple computers that are not running an Intel processor are "PPC."

Different Windows versions in the user agent

Below is additional information about each of the different versions of Microsoft Windows and their corresponding user agent string codes.

Windows 95 = Windows 95 or Win95
Windows 98 & 98 SE = Windows 98 or Win98
Windows CE = Windows CE
Windows ME = Windows 9x 4.90
Windows NT 4.0 = Windows NT 4.0
Windows 2000 = Windows NT 5.0
Windows XP = Windows NT 5.1
Windows Server 2003 and XP x64 edition = Windows NT 5.2
Windows Vista = Windows NT 6.0
Windows 7 = Windows NT 6.1
Windows 8 = Windows NT 6.2
Windows 8.1 = Windows NT 6.3
Windows 10 = Windows 10.0

How to get this information

There are a few ways to access user agent information; for example, the button at the beginning of this page to show your uses JavaScript to display the user agent string. However, if you want to gather the information or manipulate the data, it would be better to use a server side scripting language, such as Perl, like the next example.

use strict;
print "Content-type: text/html", "\n\n";

  • See the system information tool for an example of a script taking full advantage of the user agent information as well as other information obtainable through JavaScript.

Agent, Browser, Web design terms