Pages

How to let Safari pretend it's IE

Have you ever tried to visit a site that does not support Safari? Sometimes it's because the site uses ancient ActiveX controls, other times it's because they produced a site that simply doesn't render well on anything but a few browsers. They see you come in and immediately show you the door with a message like:

"Sorry! This site requires Internet Explorer 5.5 or higher!"

First, a little background
When a web browser connects to a web site it passes in a "signature", referred to as the User Agent string. It normally contains information like the operating system your computer is using and the web browser type and version. Web servers and HTML pages can use that signature to conditionally present web pages to you based on the capabilities of your browser. 

If a web site developer has limited resources they may only ensure that their site works with the most popular browser on the web, which is Internet Explorer. If it is an older site that has not been updated in a long time they may have assumed that only IE can render the site properly and, not wanting to have to deal with other browsers, simply prevented them from coming in.

Whatever the reason, there is a way to work around this and get into the sites that require a specific browser while you are using Safari. The first step is to enable the Develop menu in the menu bar. Go into the Safari Preferences and select the Advanced tab:

Select the option at the bottom to show the Develop menu and you will see a new top level menu option named Develop right next to the Bookmarks menu. From here you have access to a couple of cool things, though what we need is the User Agent selection.

Just select Develop / User Agent from the menu and select a browser signature that matches up with what the web site indicates the browser is limited to. Reload the site and chances are you will be able to get in.


Beware! Using this technique is not wise for anything really critical - there is a possibility that data entry forms may not work properly or that controls on the forms may actually give incorrect data. There is even the possibility that the browser will have some serious problems on the site. I would only use this technique if you really want to see something that a site is telling you they don't want you to see and you don't have access to a browser that works.

This option does not make Safari emulate IE or any other browser. It simply tells the web server you visit that it is something other than Safari. You will also want to reset this to Default after you are done because many sites perform conditional rendering based on the type of browser you have.

Those warnings aside, if you've ever felt a little left out because someone decides that you should not be able to see a site because you are running a Macintosh, at least this way you can get in and see what all the fuss is about.

14 comments:

RASTERMAN said...

Using this technique, I think some folks were gaining free internet access at Starbucks.

By setting their Mac Safari to "announce" that it was Mobile Safari, laptop users were allowed unlimited(?) browsing capability on the AT&T/Starbucks/Apple sponsored service.

Since this was a service being offered exclusively to iPhone users, anyone that could make themselves "look" like they were an iPhone, were able to take advantage.

Seems like a weak method of certifying access qualifications!

My understanding is that access has now been suspended.

Of course, I don't know the whole story, and never bothered to test it myself, so please forgive the lack or accuracy of any details.

Cheers!

---RASTER

David Alison said...

@Raster: Wow! I didn't know that. Would have come in handy had I known!

Beavis said...

Wow. This is like so advanced.

Anonymous said...

Naw, advanced is using actual IE on your Parallels or VMware virtual machine to fool the site into thinking you're using a real Windows machine when in fact it's just another process running in your Real OS. ;)

That's typically what I'll do with my VM. Wake it up long enough to see what the infernal website needs so you can do your thing or see it's content, then suspend it back to its dormant state and move on.

- walkerj

David Alison said...

@WalkerJ: That's usually what I end up doing but I've found that since I always have Safari handy and I don't always have the VM running sometimes I can get what I need by changing the user agent.

lonniusmax said...

I have really enjoyed reading through this blog, mainly because I switched to a Mac back in January and so am following pretty closely your "switch timeline." When I first got it I was in awe of all the cool features and was showing them off to everyone. Now that I've been at it a while I've forgotten many of the things that make it unique. I thought it might be a good idea to make some kind of "show off" list for people that want to "see what all the fuss is about." Seems like there's different levels for different people...some are wowed by things like Dashboard, while others are more impressed with things like Network Utility. Maybe the list can be broken up for "casual" users and "hardcore" users. Any suggestions?

David Alison said...

@Lonniusmax: I tried to do that to a degree by using labels in the posts and adding a Labels control at the top left of the blog. I like your idea though - I'll think about putting together a Tips post that summarizes them into areas that make sense for people. Thanks for the suggestion!

Partners in Grime said...

iCab is a cool browser for spoofing user-agent requirements. Great download features, too.

Looking forward to the feature list.

Pecos Bill said...

Of course, by doing that, you're telling that site that it's okay for them to block you based on your reported browser. And, if you care about open web standards, you might fire off a note to the webmaster or other kindly explaining that their nearsightedness is needlessly affecting their traffic. Some sites will put up a warning about using an unsupported browser at your own risk which is better than outright blocking.

Alas, if a site uses ActiveX (MLS, I'm looking at you) then you're not going to get far. I'm sure David already knows that.

@rasterman, it's true from what I read online.

larry said...

I googled and ended up here because HP's Live Support doesn't support "the web browser you are using...".
I wasn't surprised as it seems their damn printer also doesn't support the Mac Platform, though it said so on the box.
Printing works fine.
Scanning, nada. Yes I have updated the drivers, etc.
The printer-Photosmart(dumb) C4480 All In One- in case you wondered which one not to buy, also seems to shut itself down every couple of days if not used. Even though the power light is on, no printing, scanning or copying until an unplug and replug.
Funny, I just looked down at it and the window on it says 'scanning' as it has for about an hour. I keep trying, even though after dozens of attempts I have had no luck.
So, from now on, no HP products for me. I am reminded of my sons HP Digital Camera that I got him as a gift. After 3 months, it would appear to be charging the internal battery until it was done and he would take it to his buddies' and it would tell him, "No Battery Power Left, Please Charge"
2 for 2.
Thats all.
larry

Kara said...

hi,

I have a problem in Safari rendering issue of my web system! While running the system, some images are not loading correctly when in post backs. I have used jquery tabs to this also.
Other browsers don’t have this issue, only Safari [3.1.2(my version)]

I found IE8 emulate as IE7 technique as in below
meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"

So could i able find same type of technique to this issue also. That means Safari emulate as IE.

Please help me to solve this out!
Your help really appreciated!

cheers,
Karu

Anonymous said...

In trying to emuiate IE on my mac, when I get to the drop down menu on the user agent option, non of the options are available. They are listed in pale grey, which means unavailable. Any ideas would be appreciated. Thanks. Gary

Priyansh said...

Hi Kara,

I am stuck with the exact same problem as you described.
I hope you've found out a solution by now. Please share it. Very much appreciate it.

Priyansh said...

Hi Kara,

I am stuck with the exact same problem as you described.
I hope you've found out a solution by now. Please share it. Very much appreciate it.