Show HN: Favicon alert bubbles (tommoor.github.com)
A javascript library that allows easy manipulation of the favicon to include nice looking alert bubbles. This means that users can pin your site and still see when their attention is needed!
It's been done before, but in my opinion not in a way aesthetically pleasing enough for production use. This library also falls back to the standard number in page title approach for browsers that do no support canvas / dynamic favicons.
Thoughts welcome.
64 comments
[ 3.4 ms ] story [ 135 ms ] threadIt's been done before, but in my opinion not in a way aesthetically pleasing enough for production use. This library also falls back to the standard number in page title approach for browsers that do no support canvas / dynamic favicons.
Thoughts welcome.
[edit] And I am being downvoted because... ?
(I don't have downvote powers)
"Reeked of sarcasm". Jeez.
Prepending to the start of the page title does work though.
But if you have an audience skewed towards modern browsers and want to do something a little different this works well and definitely draws the eyes attention.
However, the problem with this library is it has to follow the limitations of favicons' dimensions. I think there should be an open standard for having alert badges like iPhone and Android phones put on top of home screen icons. The browser distributer could design theirs to match the UI so people could recognize them, and they could be allowed to extend just 2 or 3 pixels past the normal favicon boundaries to grab attention without being annoying or invisible.
You can tell when people want something when they're settling for several make-shift approaches at it within limitations.
Alerts should be there when I want to look for them - they shouldn't pull me out of what I'm doing. If they have to pop up on the screen for me to notice them it probably means I'm paying attention to something else.
I use Opera and it used fallback although favicon notification works for me in GMail or Meebo. You might check that out.
Both IE9 and Opera have canvas support, but they are not supported. I am pretty sure Opera has dynamic favicon support as well, not sure about IE.
Opera now works a treat :)
http://i.imgur.com/yVXLg.png
Motivates me to stop being intimidated by the difficulty of implementation, and concentrate on the power of the idea.
I'd suggest adding a config option for how to handle certain digits or multiples - personally I would prefer to have 1..20 and then 20+, 30+, etc. because they're easier to grok at a glance. I guess that could be wrapped into it pretty easily for any given use case though.
[1,2,3,4,5,6,7,8,9,10,20,30,40,50,100]
If the actual number exists in the list, show the number explicitly; otherwise, find the next lowest number and add a +.
http://graphics8.nytimes.com/js/app/timeswire/app.js
Search for this method: updatePageTimestamp
It tries to find a managebale number of updates in a relevant and meaningful time frame "There have been 18 updates in the last 20 minutes" - it works on this page:
http://www.nytimes.com/timeswire/
Personally, I would have just implemented in PHP. I already have a pretty trivial PHP script I use to overlay a site logo on images that are direct linked instead of accessed on one of my image serving sites. Although browsers might cache the favicon excessively even with the proper caching headers, would have to test. But as far as browsers would be concerned it would just be another image (even if it is generated dynamically by PHP and image magick the first time and only copied to output from a file cache after).
Which browsers do you want? :p
This morning I got the fallback display, but now it works fine. Thanks! I'll definitely use this on one of my projects.