Blog

Run Safari 3 and Safari 4 beta on the same Mac

I couldn’t find a blog post or comprehensive tutorial anywhere, but after a great deal of trial and error, I’ve managed to get Safari 3 and Safari 4 beta to run on my Macbook Pro at the same time. Most insisted you have to download WebKit… but you don’t.

It’s much easier than that, once you figure it all out… here’s how to do it!

Screenshot: Safari 3 and Safari 4 beta, side-by-side

I scoured the Internet, searching for a way to do this… I ended up referring to more websites than I can remember, mostly from the Safari 3 beta period.  A couple of approaches out there required downloading a copy of WebKit, but I couldn’t get this to work effectively. I took a lot from Michel Fortin and his post of the subject. Although his solution didn’t get me all the way there, a lot of Google searching and web board posts did.

Basically, the trouble is that Apple stores the common WebKit framework for the entire Mac.  Even if you copy Safari 3 somewhere to your machine, it will still use the newer WebKit layout engine.  The trick, then, is to provide the older framework to the older Safari instance. What’s nice about this approach is you’re just “restoring” Safari 3 and giving it the older versions of the Frameworks it relied on… no extra WebKit stuff to worry about.

Here’s how to do it:

  1. Install the Safari 4 beta.  Don’t worry; Safari 4 saves a copy of your Safari 3 install to an archive.
  2. Go to /Library/Application Support/Apple
  3. Extract .Safari4PreviewArchive.tar.gz somewhere, like your Desktop.
  4. The Applications directory contains your Safari application; the System directory contains the older frameworks, like WebKit.
  5. Right-click the Safari application and select Show Contents.
  6. Copy the Frameworks, LaunchAgents and PrivateFrameworks directories from the System/Library directory of the expanded archive to the Contents directory of the Safari application.
  7. Edit Info.plist from the Contents directory in a simple text editor.
  8. Add the following XML snippet beneath the parent <dict> element:

<key>LSEnvironment</key>
<dict>
<key>DYLD_FRAMEWORK_PATH</key>
<string>Contents/Frameworks:Contents/PrivateFrameworks:Contents/Frameworks/WebKit.framework/Versions/A/Frameworks</string>
<key>WEBKIT_UNSET_DYLD_FRAMEWORK_PATH</key>
<string>YES</string>
</dict>

That should do it!  You should now be able to run Safari 3 side-by-side with Safari 4.  If anyone knows a good file share site, I’ll be happy to post a ZIP of my version.  Hope this helps!

UPDATE: I’ve uploaded my Safari 3 standalone here.

Disclaimer: This is the result of obvious tinkering. I may have torn the fabric of space-time somewhere, and you could make it worse. Considering this possibility, I can’t imagine being held responsible if something merely goes wrong with your computer… use at your own risk. ;-)

9 Awesome Comments So Far

Don't be a stranger, join the discussion by leaving your own comment
  1. Dave
    March 3, 2009 at 1:25 pm #

    Do you do anything special to load your Safari 3 app?

    After following the instructions, I’m able to run the Safari 3 app side by side with Safari 4 beta. But it passes the Acid 3 test 100%. Which means its not honoring the LSEnvironment settings and not running the old version of webkit.

    • Clint
      March 24, 2009 at 3:07 pm #

      Not sure what step I missed writing down… see the updated post; I’ve posted an archive containing the Safari 3 app I created.

  2. Tim
    March 22, 2009 at 6:46 pm #

    Thanks for the instructions Clint :)

    I have a suspicion that my version of Safari 3 isn’t working exactly the same as it used to, despite the tweaks. Is there any way to check what version of the framework it’s using?

    Between this and having to keep IE7 around in a Virtual Box, browser makers are not making web development very enjoyable :(

    • Clint
      March 24, 2009 at 3:07 pm #

      Sorry it didn’t work for you, either… see the updated post; I’ve posted an archive containing the Safari 3 app I created.

  3. Harry
    March 24, 2009 at 3:18 pm #

    Didn’t work for me.

    1. Have Safari 3 running on Leopard.
    2. Start from your instructions.
    3. Click Safari icon in dock to start.
    4. Icon disappears; Safari doesn’t start.

    I had to re-install Safari.

  4. Harry
    March 24, 2009 at 3:42 pm #

    The standalone version works. Thanks for doing that. To make it easier, it would be great if you named it Safari3.app instead of Safari.app. Saves a step.

  5. Phil
    July 12, 2009 at 1:17 pm #

    Will your standalone work on a G4 running Tiger or is it only for Intel and /or Leopard?

  6. Clint
    July 14, 2009 at 1:41 pm #

    Phil,

    I don’t think so… but YMMV.

  7. Jeroen van Dijk
    December 15, 2009 at 3:50 am #

    The standalone Safari3 link seems to be broken. Can you please give an update? Thanks a lot in advance.

    Cheers, Jeroen

Leave a Comment

Remember to play nicely folks, nobody likes a troll.