How To Prevent Safari from Opening Downloaded Files

Safari automatically opens downloaded files it considers as Safe. It may include compressed files, PDF, pictures, videos, and other type of files downloaded from trusted sources. But sometimes, the so-called safe files may contain viruses or malware.

You might want to turn off this feature (enabled by default) for your own good. It can be done from Safari's preferences or through a simple terminal command.

Turn Off "Auto Open Safe Download" in Safari

Launch Safari, click on the Safari menu > Preferences. Go to the General tab and clear the Open "safe" files after downloading checkbox.

Turn Off "Auto Open Safe Download" from the Terminal

To turn off the auto-open function from the terminal, simply open a terminal and run the following command:
defaults write AutoOpenSafeDownloads -boolean NO
Published by jak58. Latest update on February 9, 2016 at 01:55 PM by ChristinaCCM.
This document, titled "How To Prevent Safari from Opening Downloaded Files," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (
Mac OS X - Private Browsing With Safari
Safari - How to disable plugins