This practice is sometimes used to circumvent incompatibilities between browsers due to misinterpretation of HTML, Cascading Style Sheets (CSS), or the Document Object Model (DOM).
In this example, the client computer is asked to determine whether the browser can use a feature called ActiveX.
This is no longer a reliable indicator since Microsoft's open-source release of the ActiveX code, however, meaning that it can be used by any browser.
The web server communicates with the client using a communication protocol known as HTTP, or Hypertext Transfer Protocol, which specifies that the client send the server information about the browser being used to view the website in a User-Agent header.
Use of user agent strings are error-prone because the developer must check for the appropriate part, such as "Gecko" instead of "Firefox".