Disappearing Alerts - Notification Center not working as per Preference Settings
Solution 1:
I'm a Mac OS X developer and I just finished adding Notification Center support to my app. For what it's worth, here's what I found out:
- By default, notifications (the alerts) are NOT shown if the application is already frontmost (this explains why alerts refuse to show up sometimes, and you only see the notification in Notification Center). This is up to given applications to overwrite and it is not very straightforward, so do expect most applications to not show notifications when they're active. In my opinion, this is very annoying.
- The application, after sending a notification still has a lot of control over that given notification. It can remove it from your screen at any time it wants, regardless of the settings you have. Basically, if Safari, for some reason was set to remove notifications after X seconds, it will do that, your settings do not matter.
I have no idea if this is a bug in Safari or Notification Center, or both. However, I am fairly confident that there is nothing you can do about the second issue (there might be a hidden defaults setting for the first one, but I haven't heard of it). I did check the WebKit API Specification, to make sure it's not something that the individual websites are doing, and you can rule out websites from your suspect's list, because they do not have any control over the notifications.
I guess we'll have to wait and see if Apple will address this in its next bug fix release (10.9). However, by the looks of it, not showing notifications when the app is frontmost is a "feature", so don't get your hopes up.