Auto-enabling Safari's Private Browsing

By Christopher Breen, Macworld.com |  Internet, Safari Add a new comment

Reader Leo Campo is interested in Safari's Private Browsing feature, but finds with it a measure of frustration. He writes:

I'm using Safari 4 beta on an Intel iMac under Leopard 10.5.6. I use the private browsing feature most of the time. Is there a way to make this Safari feature the default action? It gets old very fast always having to turn this feature back on every time I launch Safari, which for me, is several time a day.

Regrettably Private Browsing isn't a feature you can leave on. When you quit Safari and launch it again, you'll find that Private Browsing is turned off. And no, editing the com.apple.safari.plist file does you no good either. Safari just resets the option within the preference file when you next launch Safari.

You can, however, automate the process of enabling the Private Browsing option with AppleScript. Like so.

First, launch the Universal Access system preference and enable the Enable Access for Assistive Devices option.

Now, launch Script Editor (within the AppleScript folder inside the Applications folder) and enter the following script:

tell application "Safari" activate end tell tell application "System Events" tell process "Safari" tell menu bar 1 tell menu bar item "Safari" tell menu "Safari" click menu item "Private Browsing" end tell end tell end tell end tell end tell

Save the script as an application and then use that application to launch Safari. When you do, Safari will launch and Private Browsing will be enabled.

    Add a comment

    Post a comment using one of these accounts
    Or join now
    At least 6 characters

    Note: Comment will appear soon after you have activated your account.
    Obscene/spam comments will be removed and accounts suspended.
    The information you submit is subject to our Privacy Policy and Terms of Service.

    ITworld LIVE

    InternetWhite Papers & Webcasts

    White Paper

    Smarter Commerce is redefining value chain visibility

    Smarter Commerce is redefining the value chain in the age of the customer. It starts with putting the customer at the center of your operations - which of itself is not a new idea - however, truly operationalizing this strategy is not easy.

    White Paper

    IBM Synchronizes its Commerce 2.0 Strategy with 'Smarter Commerce' Initiative

    On March 14, IBM announced "Smarter Commerce", a strategic initiative that addresses the surging market for Commerce 2.0 solutions that take advantage of the convergence of a number of disruptive software and hardware technologies.

    See more White Papers | Webcasts

    Answers - Powered by ITworld

    Ask a question

    Ask a Question