Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Safari command line arguments

What are the safari specific arguments that are available from the MAC OS X command line ?


eg from MAC OS X terminal:


open -a safari --args <safari specific arguments>


Some of these specific safari arguments are width and heigh, opening the side bar or not etc.

These are important for applications that need to programmatically open Safari with specific preferences.


I have Googled high and low, look at Safari browser help, the Apple forum here etc. I can't seem to find anything. Explorer and Chrome's options are well documented.

Mac Pro, OS X El Capitan (10.11.6)

Posted on Aug 19, 2017 10:12 PM

Reply
1 reply

Aug 20, 2017 2:46 AM in response to sean_cal

There are no Safari command-line arguments, principally because it is an Apple Cocoa application, was not designed to accept command-line arguments, and is not written by Microsoft, Google, or Firefox browser development teams.


The open command is a separate command for launching Cocoa applications from the command line, and specifying a quoted, or unquoted URL following Safari is simply the open command passing that URL to Safari.

Safari command line arguments

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.