In the early days of the internet, websites didn’t care what browser you used, because most pages were static. But today’s dynamic websites often adapt to the operating system, browser, or screen size your device uses.
They typically do so through a bit of text called the user agent. So, let’s look at what a user agent is, what it does, and how you can make your browser pretend to be another browser or another device.
What Is a User Agent?
A user agent is a string (line of text) that your browser sends to websites when you access them. It basically serves to tell the website that you’re using the Chrome browser on Windows 10, for example.
If you’d like, you can see your user agent by visiting a site like WhatIsMyBrowser.
User agents are important because sites can use them to modify the content they send to your browser. For example, if you visit most modern sites in Internet Explorer 6, you’ll see a message that you need to upgrade your browser for proper compatibility. User agents also come into play when browsing on a mobile device, so websites know to show you the mobile-friendly version of a page.
As it turns out, your user agent isn’t permanent. It’s easy to change if you know where to look, and some extensions let you change it in just a few clicks.
How to Change Your User Agent
Let’s look at how to change your user agent in major browsers. This will let you trick websites into thinking you’re on a different type of computer or browser.
Change Your User Agent in Chrome
Open Chrome’s Developer Tools by right-clicking anywhere and choosing Inspect, hitting Ctrl + Shift + I, or by pressing F12.
At the bottom of the resulting panel, you should see a section with the tabs Console, Network conditions, and What’s New. Press Esc to show this if you don’t see it.
On the Network conditions tab, uncheck Select automatically and you can then choose a new user agent from the list. Refresh to update the page with the new agent.
Note that this setting will revert back to normal when you close the developer panel, and only applies to your current tab.
For more control, check out Google’s official User-Agent Switcher for Chrome extension. This lets you easily switch your user agent, including setting certain sites to use a different agent all the time.
Change Your User Agent in Firefox
The process to change your user agent in Firefox is clunky, as it requires you to manually paste a new user agent string. You’re better off using an add-on to easily change your user agent.
User-Agent Switcher by Alexander Schlarb is well-reviewed and easy to use.
Change Your User Agent in Microsoft Edge
Microsoft Edge uses a similar setup to Chrome for changing your user agent. Press F12 or right-click on an empty spot of the page and choose Inspect element to open the developer tools window.
Along the top bar, select the Emulation tab—you may need to click the dropdown arrow to show it if it’s hidden.
Here, change the User agent string box to trick the website into thinking you’re something else. You can also change Browser profile from Desktop to Windows Phone to view the mobile version of webpages. Like Chrome, this only applies to the current tab while the developer tools panel is open.
Unfortunately, there are no extensions that easily change your user agent for the current version of Edge. When Microsoft’s revised browser launches, this will hopefully change.
Change Your User Agent in Safari
You’ll need to enable the hidden Develop menu in Safari before you can change your user agent. To do this, visit Safari > Preferences and go to the Advanced tab.
There, check the box labeled Show Develop menu in menu bar.
Next, select Develop > User Agent and pick the option you’d like. Safari even lets you choose Other to specify your own user agent string.
Request Desktop Site on Android and iPhone
While there’s no quick toggle to change your user agent in the mobile versions of Chrome and Safari, you can easily make websites think your phone is a computer.
On Android, open Chrome and tap the three-dot Menu button in the top-right. Check the Desktop site box and it will reload to show you the full version.
On Safari for iOS, tap the aA button to the left of the address bar and choose Request Desktop Website. You’ll find the same option in Chrome for iPhone by tapping the Share button at the top-right, followed by scrolling down and choosing Request Desktop Site.
Reasons to Change Your User Agent
Now you know how to trick websites into thinking you’re on another device. But why would you change your browser’s user agent when you can just install another browser?
Here are some situations where changing your user agent could prove to be fun, useful, or convenient.
1. Website Development
If you’re developing a website (or learning about website development), it’s important to make sure your site looks good and functions properly in a variety of browsers. While swapping your agent can’t accommodate every possible real-world situation, it lets you get some basic testing done in a fraction of the time.
Perhaps you can test Chrome, Firefox, Edge, and Internet Explorer just fine on your own. But what if you don’t have a Mac to run Safari, or don’t have a tablet to test mobile versions of the page?
Further, if backward compatibility is important for your site, swapping your user agent to IE 8 is a lot easier than installing a copy of ancient browsers manually.
Whether for efficiency or because you don’t own some of the devices needed to test your site, seeing how your site looks in a variety of browsers is easy using this method.
2. View Mobile Sites on Limited Connections
On a lot of sites, the mobile version offers a slimmed-down amount of content to reduce data usage for the mobile users. While we looked at how to view the full desktop site on a mobile browser, it’s not as common to see desktop pages offer their mobile versions.
By changing your user agent to act as a mobile browser, you can force this change the next time you’re using your phone as a mobile hotspot or working on a limited connection. Browsing mobile versions of pages means you only get the basics and aren’t wasting data on multimedia or other large items.
3. Get Around Browser Restrictions
Our internal website "works best with Internet Explorer" (ie. some things only work with IE). I'm also sending this tweet from 1995.
— Jason is doing work in the background (@jason0x21) June 2, 2016
While not as common as it once was, sometimes you’ll come across websites that tell you Firefox doesn’t work with the page, or you must use Internet Explorer, or other similar warnings. If you know the site works fine in whatever browser you’re using, you can swap your user agent to oblige the website without actually changing browsers.
Remember that changing your user agent doesn’t actually modify the software you’re running—it only changes what your browser reports to the website. Thus, this doesn’t work if a website is truly IE-only because it uses archaic ActiveX controls or something similar. However, you’re unlikely to come across such sites today.
4. Better OS Compatibility
@ThreeUKSupport check account balance on the website doesn't work on linux chrome, but works on android chrome (which is weird)
— ?'????? ???????????? (@volandil) October 28, 2015
Another uncommon reason for switching your user agent appears in reviews for user agent switching extensions. Some people explain that they use these services to get around sites that block entire operating systems.
While there’s really no good reason for a site to block an entire OS, you could run into a page that complains about you using Linux. If this happens, you can just tell it you’re using Internet Explorer and the site will think you’re on Windows.
This could also come in handy if you’re using an out-of-date operating system. Those still using an outdated browser on Windows XP will likely see warnings on most websites that the browser is no longer supported. As Windows 7 is left behind, this will also happen as major browsers drop support for it.
We recommend jumping ship to a modern operating system as soon as possible. But in the meantime, you can try swapping your user agent to squeeze a little more life out of your current system.
5. See a Different Perspective and Have Fun
Are the above options too boring for you? If so, you can still use agent switching just to have a bit of fun.
If you’ve used Windows all your life, you can jump around some sites and see if they look any different when using Mac or Linux. Or change your user agent to an ancient version of Internet Explorer, then see how many sites still support it. What kind of messages do they display, and how many block you from using the outdated browser?
Some browser-switching agents even allow you to pose as Googlebot, the robot Google uses to crawl and index the web. It could be interesting to see what content sites serve to the bots!
Seeing the web from a different perspective could be enjoyable once in a while, even if you can’t get much practical use out of it.
Trick Websites With a New User Agent
We’ve looked at how to make your browser pretend it’s something else by changing your user agent. While it’s not something you’ll probably need to do often, it comes in handy at times.
Keep in mind that the user agent isn’t the only way to identify your browser, so sites may still be able to tell what you’re actually using. Even though it is fun to trick websites, it’s not a true measure of privacy.
For a deeper way to protect yourself online, you should start using a VPN if you don’t already.
Read the full article: How to Change Your Browser’s User Agent and Trick Websites
from MakeUseOf https://ift.tt/2KGFjqD
via IFTTT
0 comments:
Post a Comment