0

I'm working on a web app that does notifications much the same as Twitter, Facebook, and StackOverflow.

When there are async notifications sent to the notification area on these websites, you'll notice that usually the <title> is also updated to reflect the notification.

<title>(3) Twitter / Home</title>

I'm wondering if either Firefox or Chome have a Badge api whereby we can send a badge to the dock/taskbar that sums up all of the notifications (much the same as Apple Mail.app)? I am fairly confident that IE wouldn't have this.

So if the browser has a twitter notification,

enter image description here

It would also have a dock notification

enter image description here

note, these graphics are OS X, but my question is generic... ie: all OS platforms

My personal vision for this would be to add a meta tag to the page when the notification is sent to the client.

<meta notification-badge="3" />

If there is not an API for this, is there a way to swap out the browser icon asynchronously to achieve the same effect?

Chase Florell
  • 46,378
  • 57
  • 186
  • 376

1 Answers1

0

I didn't realize this was an apple-specific question until I saw the graphic. The answer is "No", browsers do not have Apple OS-specific APIs. You would have to write your own client application to get this effect.

Maxx
  • 124
  • 10
  • not apple specific, just what I used for my graphic. I was asking in general for any os platform – Chase Florell Mar 12 '12 at 20:28
  • It is Apple specific because other OS platforms do not have indicators on minimized applications, and browsers are designed to be OS agnostic. Aside from that, browsers are prohibited by design from running scripts that make OS API calls as this would be a huge security risk. – Maxx Mar 12 '12 at 22:58
  • browsers are not prohibited from changing their own icon, it's not doing an OS api call at all. This can work on any OS, all we need is a browser api. – Chase Florell Mar 13 '12 at 00:01
  • Windows, Apple, Google, etc. have specific very legal terms regarding the logos of their products. You can't even put your logo next to theirs without explicit authorization, so I seriously doubt that there's an API to let you violate those terms. If you believe that it's possible for a website to modify the icon of the browser, can you show a live example for such a site? – Maxx Mar 13 '12 at 23:06
  • dude, I'm sorry, that you're having a hard time understanding the question. I'm not modifying the logo, I'm asking about an API that THEY would implement. This api would allow me to add HTML to my page that tells the browser to display a badge count. Google chrome has this RIGHT NOW for their downloads. – Chase Florell Mar 13 '12 at 23:31
  • I do understand the question, but it seems I can't put the answer into a form you understand. HTML is a document format. It does not implement any sort of browser-specific/OS-specific API functions. The browser is a binary client that exposes API-like functionality via standardized javascript. Javascript does not contain any functions to manipulate the OS-level behaviors of the client application. If you can prove this wrong, please do. – Maxx Mar 14 '12 at 20:14