This tutorial is going to help website testers who have finished developing the website in a way to make it cross-browser compatible. But, to test it practically, you can either open different web browsers on different devices, or you can do the same thing using a single web browser only.
Yes, it is possible through the usage of User Agents feature available in almost every modern web browser for PC platforms. Firefox, Chrome and Internet Explorer are all in and can be used to test websites for different devices.
This tutorial is going to help you understand how to change the User Agents in Firefox, Chrome and IE. Before starting with the actual process, you should be aware of the concept of User Agents. Yes, or no?
What is a User Agent in browser?
If your answer was yes, then here is the information you wish to know. Well, the concept is pretty simple and you will understand it by reading this part only. I’ll make sure that you get everything which is required to understand.
Every modern web browser has a set of User Agents available which can be switched between. This is a little string which is added in the HTTP header which is attached and sent to the server.
The moment you open a website, its HTTP header attached with User Agent is passed to the server. Now, the server reads the agent type and delivers the version of website according to the web browser type.
In short, the User Agent is an identification of the web browser. If you’re using Safari on iPhone then it will have different profile, if you’re using Chrome on Android then it will again have different profile, and so on.
Its application is that it helps the web browser to load the compatible version of the website, instead of loading the biggest available version. Thus, if a person is opening the site on Android, will have different layout, and in case of Chrome on Windows laptop, it will have the full version loaded up.
I hope this explanation was enough for you to understand the meaning, application and importance of User Agent element in every modern web browser.
In order to know the exact User Agent of your current device and browser, you can open this website over here and it will display the details you’re looking to know.
How to Change the User Agents in Firefox
In Mozilla Firefox web browser, there is no in-built facility available to tweak these settings. You’ve to install an external add-on within the browser to get these options to be tweaked later.
Now, there are two add-ons available which can satisfy our needs for changing User Agents in Firefox browser. One is modern and second one is little outdated, but still works. So, I’ll start with the outdated one, first.
Just to update you of this vital information first, this add-on hasn’t been updated since two years. But, it is still working like it should, so I’m sharing over here. Its named User Agent Switcher, which you need to grab from here and install within the Firefox web browser.
Once installed, open this second URL and download the XML file containing the user agents list and fix it within the add-on you just installed. Yes, there will be an option to import external XML file.
Once done, you’ll just have to reach the Options page of the add-on and there you’ll have options to choose between. The list of User Agent were added from that XML files will be available and you can even have very old ones like the one which was available for Nokia Symbian powered smartphones. Cool, huh?
The second option is another add-on named Overrider which is available for free and has been regularly updated, if you were looking for this property. Once installed, you’ll have access to its Options page, where you’ll have a list of User Agent to choose from.
Once you’ve made the selection, simply refresh the webpage and the new effects will be applied. Yes, there is no need to restart the whole browser.
How to Change User Agents in Google Chrome
In case of Chrome, the process is simple and doesn’t require any add-on. This helps in keeping the number of extensions down by one. The thumb rule here is that the lesser extension you keep, higher will be the performance of Chrome.
To access and change User Agent in Chrome, you need to simply press the CTRL + Shift + J keys from the keyboard and a pop-up will appear on the right side of the screen. Click on the Resources option and at the bottom, select the Emulation tab. Double click on the icon available in the little error, which will enable this particular option.
Once enabled, you’ll have access to every available User Agent under the hood of Google Chrome. Now, select any of them from the drop-down menu and refresh the page to see results in new mode.
How to Switch User Agent in IE
Since Internet Explorer is the default web browser of Windows, so, your functions keys from keyboard can trigger the developer options. Simply launch the web browser and press the F12 key from the keyboard.
The moment you click on the key, a little window will appear at the bottom. Select the Emulation tab from that screen and then you’ll have access to the options you’re looking for.
Make your selection and refresh the browser window. The new settings will be opened and the new website will opened with that new User Agent you’ve specified.
Was it simple enough that you will not require any tutorials in future? If yes, then my task is accomplished. I wanted to share this little thing in the simplest possible way and I hope I did.
If you wish to know any further details on any related subject, then gather your thoughts in the discussion section and I’ll come up with proper answers as soon as possible for me.