LOGO

Change Safari User Agent on OS X - A Simple Guide

March 17, 2015
Change Safari User Agent on OS X - A Simple Guide

Circumventing Browser Restrictions with User Agent Spoofing

It’s a common frustration to encounter websites that function optimally only with certain browsers. Fortunately, it's often possible to make a website believe you are utilizing a different browser, and this can be achieved with Safari, among others.

The practice of user agent spoofing isn't recent. It gained prominence during periods of intense competition between browser developers. Web developers would frequently tailor website rendering and content delivery based on the visitor’s browser.

A common workaround involved transmitting a modified "user agent string," effectively deceiving the web server and ensuring access to the desired content.

Modern Web Compatibility

Currently, users are less prone to encountering browser compatibility issues due to improved adherence to web standards by both websites and browsers. However, occasional instances still arise.

Changing the User Agent in Safari

If you are a Safari user on Apple OS X, altering the user agent is straightforward. Furthermore, the creation of custom user agents is also possible.

Here’s how to modify your user agent settings within Safari:

  • First, enable the Develop menu in Safari preferences.
  • Navigate to the Develop menu.
  • Select “User Agent” and choose a pre-defined browser profile.
  • To create a custom user agent, select “Other…” and input your desired string.

Important Note: While user agent spoofing can resolve compatibility issues, it's generally recommended to keep your browser updated and rely on websites to adhere to web standards for optimal performance and security.

Understanding the User Agent

When a browser, such as Safari, requests a webpage, it transmits a text string identifying itself. For example:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/600.3.18 (KHTML, like Gecko) Version/8.0.3 Safari/600.3.18

This string informs the web server that the request originates from Safari 8, running on a Macintosh computer with OS X 10.10.2.

The specific string varies depending on the operating system and browser in use. A Windows 7 machine utilizing Internet Explorer 10 would present a different identifier:

Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)

Due to the vast number of browsers and operating system combinations, the range of user agent strings is extensive. Furthermore, your browser reveals details about your setup, including screen resolution and IP address.

Modifying Your User Agent in Safari

We have previously covered methods for altering the user agent in browsers like Google Chrome, Internet Explorer, and Firefox. Now, let's explore the process for Apple’s Safari on OS X.

Begin by accessing Safari’s preferences, either through the "Safari" menu or by pressing "Command + ,".

how-to-change-safaris-user-agent-in-os-x-1.jpg

Within the preferences window, select the "Advanced" tab. At the bottom of this tab, enable the "Show Develop menu in the menu bar" checkbox, then close the preferences.

how-to-change-safaris-user-agent-in-os-x-2.jpg

Safari will now feature a new menu dedicated to development tools.

The "User Agent" menu is located at the top of this new menu. A variety of pre-defined options are available, including older Safari and iOS versions, Chrome for both Mac and Windows, and an option labeled "Other..."

how-to-change-safaris-user-agent-in-os-x-3.jpg

Selecting "Other..." allows you to input a custom user agent string. This is useful for simulating different browser environments, such as testing how Google Chrome on an iPad running iOS 8.2 would render a webpage.

how-to-change-safaris-user-agent-in-os-x-4.jpg

When choosing "Other...", you can either type or paste the desired user agent string.

how-to-change-safaris-user-agent-in-os-x-5.jpg

The newly entered user agent will then appear as an option within the User Agent menu. It's important to note that only one custom "other" user agent can be saved at a time.

how-to-change-safaris-user-agent-in-os-x-6.jpg

As previously mentioned, altering your user agent is generally unnecessary. Modern browsers largely adhere to web standards, and most websites are designed to be browser-agnostic. However, some sites may function better in certain browsers.

If you're interested in evaluating your browser's compliance with web standards, consider utilizing the Acid Tests developed by the Web Standards Project.

We trust this guide has been helpful. Should you have any questions or comments, please share your thoughts in our discussion forum.

#Safari#user agent#OS X#change user agent#browser compatibility#web development