Safari for Mavericks has a website notifications feature allowing sites to send push notifications.
I never want to be prompted for this.
How can I disable the prompt for all websites, forever?
Since the release of Safari 7.0.3 Apple finally gives us an option to turn off safari notification prompts. To disable safari notifications go to Preferences within Safari. Click the Websites tab (notifications tab for older versions of safari) and uncheck "Allow websites to ask for permission to send push notifications". And voilà.
Websites panel for current Safari (as of High Sierra):
Panel for older versions of Safari:
The explanation below is only valid for versions of Safari before 7.0.3
Apple obviously forgot the option to disable the notification thing in Safari altogether when they added the feature. Anyway this works, but is not for the faint of heart. ** This is only for older Safari before Version 7.0.3 **
Stop Safari Open Terminal cd ~/Library/Safari chmod 000 RemoteNotifications/
That's it. The chmod 000 just makes the directory RemoteNotifications inaccessible. To make it accessible again (and to re-enable notifications in Safari) just do the above again but use 755 instead of 000 in the chmod command.
As lined out in Renés comment below, it is also possible to change the access rights via Finder.
The proposed answer of chmod 000 RemoteNotifications does work, but unfortunately console is spewed with many failed attempts to access files in the directory.
The messages are all being logged by a process called SafariNotificationAgent which appears to be the single source of grief. This process can be stopped entirely using:
launchctl remove com.apple.SafariNotificationAgent
OS updates might turn this back on, but I'd rather it not even be wasting system resources trying to access a folder for a feature that I never wanted in the first place.
Today in Safari 11, this is available in Safari preferences under "Websites" > "Notifications". The built-in help describes it simply:
Stop seeing notification permission requests in Safari: Choose Safari > Preferences, click Websites, then click Notifications. Deselect “Allow websites to ask for permission to send push notifications.” From now on, when you visit a website that can send you notifications, you aren’t asked.
There seems to be no way to do it. I am thinking of using a plugin to block this code from running. It seems to be related to window.safari.pushNotification.permission in source code.
defaults write ~/Library/Preferences/com.apple.Safari CanPromptForPushNotifications -boolean NO
To add on to existing answers:
Maybe after some time the second part of the accepted answer is outdated. It didn't stop the process. I had to go to activity monitor to find the process in the file system.
So I ended doing
sudo tcsh chmod 000 /usr/libexec/SafariNotificationAgent
Works perfectly so far. The process doesn't run anymore when I restart Safari.
I tried everything but finally got this this is amazing and it worked http://forums.adobe.com/message/5791174
We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.
Go to System Preferences > Notifications > Safari, and then disable it from there. This will disable notifications for Safari, but I don't know if the prompt will stop. You have some more settings in Safari itself, but that's more management.