Redfin Supports Safari! Um, kinda…

SafariUPDATED: As of January 31, 2008, Redfin supports Safari 3 without any of the trickery described below. We’ll leave the post here for the curious, but in the meantime, there’s no reason to go through these steps on our account.

Last January, we ported Redfin from a proprietary map platform to Microsoft’s Virtual Earth, a move that has enabled us to move faster in adding new markets and features. We’ve gotten both praise and criticism for the move over the last 9 months, but no piece of feedback has been as constant or as vociferous as the cry of Mac users who want us to support Safari.

As a MacBook Pro user myself, I understand the desire for us to support the native Mac browser (of course, we do support Firefox on OS X), but Virtual Earth didn’t support Safari, so we were pretty much out of luck. And although I like Safari, we have to admit that Safari 2 is buggy at best with support for CSS and JavaScript. Applications like Redfin or Virtual Earth that use a lot of client-side scripting are bound to have problems with Safari 2. This doesn’t mean that it’s impossible to support Safari 2, but it is likely to require significant testing and engineering to get a site to work properly.

The upcoming Safari 3, though, has taken a massive leap forward in terms of standards support, and it’s crazy fast to boot. While we don’t support Safari yet officially, you can use Safari 3 with Redfin if you trick Redfin into thinking that you are running Firefox, and it Mostly Works ™.

Before you start, please note that Safari 3 is in beta, it is not to be used on mission-critical systems, this is all at your own risk, your computer could spontaneously explode, etc. With that disclaimer out of the way, here’s how you get Safari and Redfin to play nice:

  1. Download a copy of Safari 3, either the Safari 3 Public Beta from Apple or the WebKit nightly from webkit.org. The Safari Public Beta is a better tested build, but it may not have all the bug fixes of the nightly build from webkit.org. Also note that installing the Safari 3 Public Beta will get rid of Safari 2 on OS X, whereas I believe (but am not 100% sure) that the WebKit nightly can co-exist with Safari 2.
  2. Turn on debug functionality for Safari. On Macs, do it this way:
    1. Quit Safari so it’s not running.
    2. Run the program called “Terminal” which is located in your Applications->Utilities folder.
    3. Type the following command into Terminal exactly as shown:
      defaults write com.apple.Safari IncludeDebugMenu 1
    4. Quit from the Terminal program, and launch Safari again. Safari should now have a “Debug” menu. If not, check the command you typed above. Case is important.

    On Windows boxes, turn on the debug menu this way:

    1. Quit Safari so it’s not running.
    2. Open the file at:
      c:Documents and Settingsyour usernameApplication Data
      
      Apple ComputerSafariPreferences.plist
    3. Add the following text to the file before the final </dict>:
      <key>IncludeDebugMenu</key>
      
      <true/>
    4. Launch Safari again. Safari should now have a “Debug” menu.
  3. Launch Safari 3. In the Debug menu, select User-Agent –> Firefox 2.0.x.x. (The exact version of Firefox in the Debug menu depends on which build of Safari you have.)
  4. Go to www.redfin.com, and use Redfin to your heart’s content.

There are a few things to note here. First, you will have to switch the User Agent every time you open a new tab or restart Safari. Second, there are also a few known bugs we’ve seen with just the limited testing we’ve done:

  1. Depending on which version of Safari 3 you get, the images of houses next to the map may be stretched weirdly.
  2. The zoom bar on the map isn’t centered correctly.
  3. Keyboard shortcuts on the map page (up/down/left/right) don’t work correctly.

If you try this out and find any other bugs (and we’re sure they’re there), let us know in the comments section.

(Photo credit: p_c_w on Flickr)

Discussion

  • Margaret MacDonald

    Have you tried using VE 6 with Safari? Microsoft claims it supports Safari for the Mac now using the VE 6 API. But I haven’t been able to find any VE maps or apps yet that work for me.

  • http://devblog.redfin.com/author/sasha.aickin Sasha

    Margaret,

    We have tried VE6 internally, and it mostly works for us, although we do need some tweaks. We’re planning on supporting Safari as part of a release that’s coming out in a few months.

    Since Microsoft just released VE6 two weeks ago, there are almost no production sites that use it yet. However, you can check out their Interactive SDK site at http://dev.live.com/virtualearth/sdk/ , which does use VE6.

  • Alexwebmaster

    Hello webmaster
    I would like to share with you a link to your site
    write me here preonrelt@mail.ru