3 Jan 2020


A user agent is a "string"- that is a line of text that tells the web server the following  things about your computer.

(1) The type of operating system being used on your computer
 (2)The browser being used on your computer
(3) The version of the window being used on the computer.

 The web server uses this information to serve different webpage to different web browser and different operating system. For example, a server could send a mobile pages to mobile browser. Each browser has its own unique user agent. For example,
This is fire-fox user agent:- mozilla/5.0( window NT6.1)
. Wow 64; rv 12.0? Gecko/20100101 firefox/12.0

Read More



This user agent tells the web server quite a bit. The operating system is window 7( code name window 14,6.1), it's a 64 bit version (Wow 64) and the browser itself is fire-fox 12

Uses -

To get serve the appropriate web pages to different web browsers
 - To serve different content to different operating system
-Gathering statistics and information about a particular computer.
-To By-pass restricted sites.

Having known what user agent is,let us see how to change your user agent and why you may want to do so.There are several reasons that one might wish to change the user agent of his browser.One of the most common reasons is in the case of web development.

While I strongly believe that the best practice here is to simply install additional browsers to get the most genuine experience, switching your browser’s user agent will allow you a quick and easy peek at what your work looks like in other browsers.Another case where browser user-agent switching may be useful is when you’re trying to view how a website appears on mobile. Maybe you have a slow or limited connection, or the website has other functionality or features available to mobile browsers. Switching your user agent allows this without the inconvenience of having to use your phone.

 Changing your user agent can also assist you in getting around browser-based restrictions. Though it’s not nearly as common as it was a decade ago, you’ll sometimes see websites that claim incompatibility with a certain browser build and will completely deny access to anyone using it. You can work around this by simply changing the user agent.

 Last but not least, consider your browsing privacy. While a user agent won’t identify you anywhere near as narrowly as an IP address, you’re still giving up the way you browse. However, you should be advised that there are ways for websites to see beyond the user-agent string and identify your browser. In the case of security, this isn’t foolproof.

 How To Change Your User Agent

Your User Agent can be change with or without and add-on.So let us look at how to change user agent without an add-on in firefox, chrome, opera, safari, microsoft edge.

How to change User Agent in firefox

• Open a new tab 

While Firefox has a standard settings interface for changing common settings, the interface for changing advanced settings such as the user agent in Firefox is done via the browser itself. Please open a blank window or tab.

• Browse to "about:config" In the address bar, type in about:config and press the "Go" arrow • Dismiss the warning The "about:config" system will give you access to change special settings which might make your Firefox unusable or behave strangely. Firefox will give you a warning about this to make you aware of it. The warning will say "This might void your warranty". Don't worry, you don't actually have a warranty from Mozilla and you are not voiding anything, this is a confusing and silly attempt at being funny by the Firefox developers. As long as you follow the instructions here, you should be fine.

 • Create a new preference item Firefox's settings are stored as a series of Preference Names and Values. The initial display of "about:config" will show you the hundreds of settings which Firefox is using. You can scroll through them to have a look if you're curious. Just be careful to not change anything unintentionally!

The setting to change your user agent doesn't exist in a default installation of Firefox; you need to create it yourself. To do that, you can Right-Click any where on the list of preferences and go to the "New" item which will be in the menu that appears. The "New" menu item then expands to show you three options: "String", "Integer" and "Boolean". Create a new "String" preference by clicking on it. Firefox will ask you for the new Preference name: enter general.useragent.override and Press "OK" You are then prompted for the user agent value you want to use. You can paste or type in whatever user agent you need to use. Once you've entered your desired user agent string, press "OK" again. Firefox will now use that user agent when you make requests.

 • Close the Preferences window 

Now that you have selected your default browser for macOS, you can close the Preferences window (by clicking the red dot in the top-left corner) and resume your web browsing.

 • Resetting your user agent in Firefox

 Firefox will continue to use the user agent you've set until you delete the preference you've created. To do that, search for the general.user agent.override preference in the "about:config" window; if you've still got the preference in your system, it will appear, displaying what you've changed it to.

If it doesn't appear then Firefox presumably isn't overriding your user agent any more. Double check what Firefox is sending as your user agent Maybe the setting has already been reset? Once you have found the preference that is overriding your user agent, get rid of it by Right-Clicking on it and selecting "Reset".
The preference item will still stay there but it will no longer be bolded, the value column will be emptied. Your user agent is now reset back to it’s default firefox user agent The next time you start Firefox it will disappear completely.

How to change user agent in chrome 

First step is to open chrome developer console. To do so. Go to your chrome menu in the browser  window and select the option" more tools",and then select "Developer Tools". A panel should open at the right hand side of your browser window.
  • Click on the icon of the three vertical dots (top-right corner).
  • In this menu, hover over More tools and then select Network conditions.
  •  

Go to the Network conditions tab and disable the option Select automatically.



Click on the Custom list and choose the desired browser to emulate. Alternatively, you can enter a custom user agent value using the text box below the list.

 How to Change User Agent in Opera

  1. Right click on page and choose "Inspect element."
  2. Click 3 vertical dots in upper right corner, "More tools, Network conditions."
  3. Uncheck "Select automatically.
  4. Click on the box right below that and choose your Browser ID string.
  5. Refresh the page you had trouble with!

  We can also change user agent using a third party app called User Agent switcher. I write about this in my next post


No comments: