Walker News

What Is that User Agent String Used For

For those who has experience in using download manager, such as Free Download Manager or FlashGet, the “user agent string” might be a familiar term.

What’s that user agent string used for?

The structure of Internet Explorer user agent string.
The structure of IE7 user-agent string sending to web server – MSDN

In sort, user agent string is used to identify a web surfing tool (typically is a web browser in the good old day) and provides certain system details to the web server.
The web browser will send its user-agent string to the web server whenever it start loading a web page. Based on the user agent string, the web server is able to collect statistics of the browser version, operating system version, service pack level, media player version, etc, and provide tailored content for a specific browser. For example, the official Adobe Reader download site allows Opera web browser to directly download all versions of Adobe Reader without using its Adobe Updater client.

As shown in the figure of Internet Explorer user agent string structure (above), IE7 identify itself as a Mozilla 4.0 web browser (for historical reason) with three optional details (called token) that are surrounded by parentheses:
  • The Compatibility token indicates that IE7 itself is compatible with a common set of web browser features.
  • The Version token identifies the browser version as IE7.
  • The Platform token identifies the client OS version, where “Windows NT 6.0” indicates the latest Microsoft Windows Vista.

How to check the user agent string of a web browser?

Here are two of the many ways to check the browser user agent string value:

Using Javascripts

On most javascripts enabled web browsers, you can just copy and paste the following javascripts (case-sensitive) in the address bar follow by pressing ENTER key:


will pop up a dialog box that displaying the web browser user agent string information, as shown in the following snapshots taken from Firefox 2.4.x, IE7, and Opera 9.21.

Sample output of executing java-scripts to check user agent string of IE7, Firefox, and Opera web browser.
Sample output of executing to javascript:alert(navigator.userAgent) to check the user agent string of IE7, Firefox, and Opera web browser.

Using Online Web Service

When a web page is loaded, the web browser will sending HTTP header to web server. Hence, the specific web service module will able to read and render the various HTTP header information, where one of them is the “user agent string”.

There are number of such online web services to specifically checking user agent string, such as:

If anyone of those web services is not able detect your web browser user agent string, mostly likely it’s using the javascript trick.

For computer geeks and advanced users, it’s possible to capture the user agent string sending to web server with packet sniffer. Out there are many power packet sniffer available as freeware – one of the popular network sniffer is the Ethereal sniffer program!

Note of thoughts:

On security aspect:

As you can imagine, web hackers are relying on user agent string as one of the many ways to gather client information. Hence, the more information a hacker can detect, the likely you’ll getting some form of web attacks or Trojan threats. Remember the user agent string can contains additional system details, such as service pack level, OS type, media player capabilities, etc!

On accessing certain web services:

Some of the web pages and web services will actually restrict certain type of web browser from viewing the site or using their services. By changing the user agent string, known as user agent spoofing technique, one might able to fool such web sites or web services and get rid of the restrictions.

For example, you can change the IE7 user agent string to Opera 9.21 in order to download all versions of Adobe Reader directly without using Adobe Updater!

Custom Search

  1. How To Change User Agent String – Walker News 05-07-07@00:35

    […] question of What’s that user agent string used for? should has been duly answered in the previous post. The next question is about How to change or […]

  2. How To Bypass Experts Exchange Membership Restriction – Walker News 18-08-07@14:20

    […] Spoof the User Agent String as Googlebot. You shouldn’t be prompted with membership-only messages after changing or spoofing the Firefox User Agent String as Googlebot/2.1 (+http://www.googlebot.com/bot.html) […]

  3. How To Check .Net Framework Version Installed – Walker News 16-05-08@00:37

    […] the User Agent String of Internet Explorer web browser. This is the easier way, I think, as every Windows bundled with […]

  4. How To Change Google Chrome User Agent String? – Walker News 15-12-08@00:30

    […] browser identifies itself to web server with an ID, a web ID that is commonly known as web browser User Agent String. Based on this reported ID, the web server-side programming logic can (by theory) delivers […]

  5. ip address finder 07-04-09@18:12

    The original goals:

    * Obey the standard described in RFC 1945 and RFC 2068.
    * Don’t break existing web servers.
    * Don’t break existing log-file analysis software or user-agent parsing code.
    * Keep the User-Agent string reasonably short.
    * Use a consistent, obvious, and easy-to-parse format.

2018  •  Privacy Policy