Friday, March 16, 2012

What is User Agent? What are the benefit?



What is User Agent ?


A “User agent” is a piece of metadata that describes browser or device that it’s being rendered or viewed upon. It’s a string of text that allows the server/client to figure out what browser, mobile device you are using. Being able to manually switch is very important to allow testing and user agent detection.


In short user agent tells a server that from which device you are using network. For example if you are using Email Reader than it's user agent is Mail User Agent.




What are the benefit of using User Agents ?
  • Suppose that if you are a using emulator to test apps of mobile, iPad, or any other device on PC or laptops, probably you have to install app from that device and than copy to pc or laptop, because if you try to surf market or iTunes from pc it won't allow you to download because your browser's user agent tells server that you're surfing from pc. So to be able to download you have to change user agent.
  • If you want to check that in mobile devices how's looks your site, than user agents can help you.


Example :


Here in below screenshot I am using Firefox 11 on Windows7 and opened 123myip to check my ip address, location, operating system and browser, but as i have changed user agent it's showing browser Chrome 14.0 and os Ubuntu 11.04.
Click to Enlarge


Enjoy !!!


Related Posts:



Related Posts Plugin for WordPress, Blogger...