What is a User Agent?
Sometimes technical terms are both misleading and confusing. Here's an example: user agent.
It sounds as if it could be someone who represents your rights as a computer user. But it's not. Or maybe it's what you call a spy for a software company who tracks your online behavior. But that's not correct either. Fact is, it's nothing quite as mysterious or interesting as that.
To begin with, a user agent is not a person. Rather, it is a computer program (an application) or even a computer system that's very much involved with helping you get onto the Internet. As an application, it is used with one of several TCP/IP networking protocols—specifically, it's the one that connects you the website you're trying to reach. "User agent" refers to the application that remotely accesses a different computer, usually a server, through the network.
Let's state it a simpler way:
When you're surfing the Internet—hopping from one Web page to another, sending emails from your Gmail or Yahoo email account, or shopping on Amazon.com—your Web browser (Google Chrome, Firefox, Internet Explorer) is the user agent. The network you're accessing is the Internet, with a specific website or service in mind (such as Amazon.com).
This point-to-point or system-to-system connection is often referred to as a client-server. It's the way it works on the Internet. It means that the Web browser you're using is accessing a program (such as Gmail) or a service (such as Amazon.com) that operates on some other faraway computer. Your computer (the client) is connecting to the desired Web page (the server) through one of the TCP/IP protocols.
Now that we've broken it down into basics, let's look at the process a little closer.
Breaking it down even more.
When you key in a "query" on your Web browser (user agent) and hit "enter," a text string (a programming sequence of symbols) is sent to the server of that website. While the text string identifies itself to the server as a user agent, it simultaneously requests access to the website. This text string identification includes specific information:
- The browser application name and version
- The host operating system and language
That text string might look something like this:
Mozilla/5.001 (windows; U; NT4.0; en-us) Gecko/25250101
When the Internet was young, the World Wide Web was dominated by a few of the first generation of browsers. As a result, many Web servers were designed to interact and connect with only those leading browsers. This was possible because the website could identify that Web browser as the user agent by its text string when it requested access to the site.
When the Web servers got a request for access, they would sniff out the browser via the user-agent text string, and if it didn't instantly look familiar, it would reply with incomplete information...or it simply did not reply at all. That meant access to the website was denied.
To overcome this roadblock, competing browsers were modified to replicate or impersonate text strings that would be accepted by the website. This is called user-agent spoofing.
An early example of this is when the browser Internet Explorer spoofed its primary rival at the time, Netscape Navigator. They did it so people using Internet Explorer could gain access to websites that were being limited to Netscape browser users. Microsoft modified Internet Explorer to send a user-agent text string that imitated a Netscape browser. The trick worked and Explorer users got access to the website without ever knowing about the spoofing.
But that was long ago—eventually, all websites accepted user-agent requests from just about any browser used. After all, the Internet was about promoting computer usage and sharing information, not limiting access to users.
The user agent is still an important part of your Internet experience. When you go online, it's at work, letting websites and online services know that you need access.