Know your user-Agent String

3 Feb

Sometimes during performance testing it becomes necessary our script send the correct user-agent string to the server so that server identifies and responds correctly to the script.Most of the load testing tools available in market today provide a way to customize the user-agent string. So in case if you want to know and customize the user-agent string, then below JavaScript function can help you in getting this information. All you need to do is copy and paste the below piece of code in your browser and press enter key. Modal window box will be displayed showing you the user agent string of that browser.

javascript: alert (navigator.userAgent);

In fact with this function, you can get lot of information like version of framework involved, type of platforms, OS version etc. etc. Most browsers today send around at least 2 to 3 lines of information as part of user agent string and they send it voluntarily and send it for every request they serve.

Sometimes I really think is it necessary and correct for browsers to attach unnecessary information on every request they serve? Isn’t there any other better way to track the browser’s usage/OS Penetration rather than choking the network with extra characters that very few people care about?

Technorati Tags: ,
Advertisements

2 Responses to “Know your user-Agent String”

  1. Ankit February 4, 2012 at 5:25 pm #

    In LoadRunner, where do I use this

    • kiranbadi1991 February 11, 2012 at 3:43 pm #

      Look at the run time settings, there is an option to send custom browser user agent setting.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: