I have an internal application that needs to be accessed by employees from their Macs at home. We have a way to facilitate this access, but have some concerns that information could be unintentionally leaked via the browser cache.

For Windows platforms, we have software that is part of the remote access solution that will allow us to clear the browser cache. For the Macs, no such solution exists -- but Safari private mode will address our concerns.

Does anyone know of a way to write a script that will open Safari in private mode and write a cookie or some other artifact that would indicate to the server that the script launched Safari?

  • First, "allow us to clear the browser cache" may fail on many occasions (for example, if the user is using a browser other than IE or Firefox). Second, Macs also have other browsers than just Safari. Jun 3, 2009 at 17:50
  • On the Windows platform, we can restrict what browsers access the resources on our network. On Mac, we would probably only support Safari. Jun 3, 2009 at 18:22

3 Answers 3


To have Private Browsing always enabled:

defaults write com.apple.Safari WebKitPrivateBrowsingEnabled true

It's supposed to work - but seems in testing to be rather sporadic as to when it actually works and when it doesn't.

The above is incorrect. The key WebKitPrivateBrowsingEnabled is only available via MCX and simply allows one to disable to the Private Browsing feature all together in Safari. So at the moment there is no way to have Private Browsing automatically enabled in Safari.

  • Wouldn't this just set it to be the default - rather than always enabled? Jun 8, 2009 at 21:20
  • This is supposed to force it to be enabled - but yes it can be turned off. That said in testing it doesn't always seem to take which makes it that much more annoying.
    – Chealion
    Jun 8, 2009 at 21:35

An alternative to consider would be using Citrix to launch the application remotely. This keeps all data (regardless of client platform) on your internal systems while giving the users' access to the application.

  • That would be my preference as well. Unfortunately, "external factors" are forcing us to allow direct browser access. Jun 3, 2009 at 18:21
  • 1
    Does setting no-cache directives make it secure enough? Jun 3, 2009 at 18:48
  • I'll look into that -- that may be ok. Some websites are controlled by 3rd party apps, so I'm not sure if we could mandate something like that. Jun 4, 2009 at 12:40
  • You could look at using a reverse-proxy type configuration with ISA or something like a Bluecoat proxy. You should be able to enforce no-cache directives that way as well. Jun 4, 2009 at 16:41

I would say just use SSL on your internal sites. My understanding is that browsers do not save data to disk or cache if accessed via SSL. Have the cookies expire when desired and you should be safe!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .