5 ms·
Favico.js – Animated favicons
- taspeotis 11y agoAtlassian Bamboo does this really well: if your tab is open on a build that's in progress the favicon will represent how far along building it is.
- Dylan16807 11y agoWhy not set your favicon to a gif?
- hanniabu 11y agoDoes that work? I thought gifs weren't valid format for a favicon?
- ch4s3 11y agocorrect
- zeta0134 11y agoThey aren't, but many browsers still display them, and last I checked both Firefox and Chrome animate them. You shouldn't use them if you can help it.
- Pxtl 11y agoSo does this js work for IE and Safari? If so, we've got a polyfill!
- TazeTSchnitzel 11y agofavicon.ico is a Windows icon, but icons specified in <link rel=icon> don't have to be.
- rpgmaker 11y agoAnimated favicons are a huge distraction and suck. From the looks of it this project aims to make the favicon display useful information like notification counts instead of animated loops.
- TimMeade 11y agoNow that just looks useful. I can think of several uses. Thanks
- vortico 11y agoOn Firefox on Linux, the favicon flickers if changed quickly in this example. The webcam is a hilarious example. Reminds me of this 1-dimensional video game you can play in your address bar. http://glench.com/hash/ http://glench.com/hash/
- pmontra 11y agoVideo and webcam flicker too.
- zamalek 11y agoOn Windows as well. Seems to be a general Firefox problem.
- Too 11y agoOnce the images are loaded it doesn't flicker, if you press the +1 button a few times it flickers but when you go back with -1 everything is already loaded and it doesn't flicker.
- nailer 11y agoMaybe use 'new Image().src' to preload the images?
- tyre 11y agoGreat example of a micro-library. Small, does one thing and does it well.
- sergiotapia 11y agoIt has both MIT and GPL licenses. For us non-lawyers, what does this mean?
- bendykstra 11y agoYou get to choose the license that works best for you. http://savannah.gnu.org/maintenance/DualLicensing/ http://savannah.gnu.org/maintenance/DualLicensing/
- conradk 11y agoIsn't MIT compatible with GPL though ? If it is, what's the point of having both ?
- deleted 11y ago[deleted]
- billyhoffman 11y agoFrom a business's perspective, the MIT license is similar the BSD license: you can incorporate MIT licensed code into commercial products/proprietary code and only have to include copyright notices. GPL has source code disclosure implications which can be deal breakers for some businesses.
- gruez 11y agoI think he was asking why anyone would choose GPL, considering MIT is more permissive in every way.
- simple10 11y agoMaking something dual licensed allows for the next dev to make modifications and then release those mods under his/her preferred license. You could make a mod of favicon.js and release your mod under GPL to ensure any further modification of your code and your favicon.js branch stays under GPL.
- dvdplm 11y agoThis is quite lovely. Very good job. :) I for one would be very curious to read about how this works (too lazy to read code right now!)...
- Mahn 11y agoDidn't read the code of this specific project but if recall correctly, you can change the favicon by setting it in the dom to the base64 representation of the icon data any time. From there, generating animations is just a question of filling pixels data with the canvas API and getting the resulting base64 string out of said API as well. Obviously all of this works only if the browser is relatively modern.
- hhw3h 11y agoWhen running a cloud based continuous deployment build it would be an awesome way to get an indication that the build successfully deployed or failed.
- sams99 11y agoSide note on fancy favicon stuff ... be sure to check out: https://github.com/discourse/discourse/blob/master/app/controllers/static_controller.rb#L94-L126 https://github.com/discourse/discourse/blob/master/app/contr... You want your favicon asset on the same domain serving the page otherwise there is a bunch of CORS work.
- franze 11y agoreminds me, i once coded a webcam2favicon streamer in literate coffeescript https://github.com/franzenzenhofer/webcam2favicon https://github.com/franzenzenhofer/webcam2favicon so basically the readme is the code. it's from 2013, still works in FF, chrome seems to have changed the way they handle changes in the favicon.
- buro9 11y agoWhat I want from favicons is SVG support. It makes so much sense it hurts, especially when we think of desktop links, home page pins, etc. The whole "bundle multiple sizes of animated files into one container" is crazy when they are nearly always different resolutions of precisely the same file. If we have SVG we could modify the SVG at runtime to have it display additional data really easily. As for video in favicons... kill me now. SVGs and a strict limit on favicon sizes would be good (enforced by browsers, ditch anything over 50KB - it should be more than enough!). A nice bug I saw recently was that a server could be instructed to send an infinitely sized favicon, and the browser would happily consume it. Nice way to drain a phone battery, use all of the connection bandwidth, and just to play havoc. What I want from favicons: 1) SVG 2) SVG support for icons in all major OS's so that desktop links and homepage links just work as SVG 3) Max-size enforced by browsers
- malandrew 11y agoDo SVGs really perform better than pixel are for what favicons are used for? I was under the impression that vector graphics performs poorly at small sizes.
- sova 11y agothis is sweet. good werk
- amatriain 11y agoIt is a very nice library. However be aware that it currently has issues in chrome if your page has several icons: https://github.com/ejci/favico.js/issues/85 https://github.com/ejci/favico.js/issues/85
- herbst 11y agoThere is not a single Favicon visible for me on this site. Guess they are all loaded remotely or something. No idea. Chrome / Ublock Origin / Privacy Badger.