You can also watch this video at YouTube (but with ads).
MacMost Now 749: Programming JavaScript To Send Safari 6 Notifications
Comments: 6 Responses to “MacMost Now 749: Programming JavaScript To Send Safari 6 Notifications”
Comments Closed.
You can also watch this video at YouTube (but with ads).
Hi Gary, Thanks for providing this interesting example of using the new Notifications technology. It worked great on Safari 6 on my Mac running Mountain Lion. Is this kind of JavaScript also supposed to work (or work in some future release) of iOS on iPods, iPhones and iPads? Right now your sample web page did not seem to work on my iPhone.
I haven't tested it, but perhaps in iOS 6? If not, I'm sure Apple will have it working at some point. Of course it doesn't work with other browsers and on Windows, so there's probably no rush.
Is it possible to send notifications without first requesting permission? Only asking because it might be possible for a website to use notifications as a new form of pop-up for advertising purposesm which would get annoying.
No. You have to ask permission for a notification. Of course a web site could pop up a notification-looking graphic on its site. That's been possible since the start of the web. But to get into the Mac's notification center, permission has to be asked first, and you always have control over your list of allowed sites. So this won't be used for ads.
I am trying to get my head around this feature. I work in a school. It is a challenge to communicate with middle school students. We make daily announcements, to remind students about up coming events, and procedures. The idea of notifications being pushed to their MacBooks or in some schools I am familiar with that have iPads, is interesting. I want to try this. We use Joomla and I am not sure the HTML script would work on that page. Hopefully, someone will try it. We are not running Mountain Lion on our MacBooks, and are not using iPads. It is still a cool idea and I can see the pluses of running it on a website in schools.
It wouldn't work unless they are using Mountain Lion. Plus, this kind of notification only works if they happen to be looking at the web site at that time. For what you want, it would probably be best to figure out a way to send text messages to them. Those are like pure notifications. Text messages or emails.