Home     RSSRSS

Know your user-Agent String

February 3, 2012 by kiranbadi1991 | Filed under Browser, Development.

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: ,
← Previous

Tags:

Comments are disabled