Flash detection with Javascript to disable line graphs automatically
Hey everyone, today I added in something to automatically disable the Flash line graphs if we detect that your browser does not have Flash installed. We think this will be particularly useful for those of you who check Clicky constantly on your iPhone, since it doesn't support Flash. This way, when you look at Clicky on your iPhone, it will use our old school bar graphs, but then on your normal browser, it will show the line graphs again, without you having to change the preference back and forth manually.
There are a billion flash detection Javascript libraries for download, but they're all huge because they do a billion things. I just wanted something that detected if Flash is supported at all, or not. So, I cooked up my own script. As usual, MSIE made doing something useful as complicated as possible. What would have taken me maybe 15 minutes turned into multiple hours of testing, testing, testing for MSIE.
It seems to be working really well, but I only tested it on fairly modern browsers. If anyone has any problems with this script (e.g., you have Flash, but it's not letting you use it), please let me know.
Also if there are any Javascript experts in the hiznat, please take a look at my code and let me know if you have any suggestions: http://static.getclicky.com/inc/javascript/flashcheck.js. FYI, I'm only setting the cookie for 1 day, so that if there any problems and I release updated code, the problem will solve itself in 24 hours. Once I'm positive this is working as expected, the expiration time will be much longer.
8 comments | Aug 27 2008 6:35pm
There are a billion flash detection Javascript libraries for download, but they're all huge because they do a billion things. I just wanted something that detected if Flash is supported at all, or not. So, I cooked up my own script. As usual, MSIE made doing something useful as complicated as possible. What would have taken me maybe 15 minutes turned into multiple hours of testing, testing, testing for MSIE.
It seems to be working really well, but I only tested it on fairly modern browsers. If anyone has any problems with this script (e.g., you have Flash, but it's not letting you use it), please let me know.
Also if there are any Javascript experts in the hiznat, please take a look at my code and let me know if you have any suggestions: http://static.getclicky.com/inc/javascript/flashcheck.js. FYI, I'm only setting the cookie for 1 day, so that if there any problems and I release updated code, the problem will solve itself in 24 hours. Once I'm positive this is working as expected, the expiration time will be much longer.
8 comments | Aug 27 2008 6:35pm

Recent Comments
dude, you work and talk with your heart. wish more people did that exact same th ... Chris, Nov 23 2008 I skipped the article, and so life goes on. If you promise to never, never to do ... Howard Sander, Nov 21 2008 Now time to grow even more! Wes Mahler, Nov 19 2008 Sean you did the right thing with the public apology. We all do things once in a ... Thomas A. Markel, Nov 19 2008 Stupid things can be done only by SMART peoples. For the others, stupidity is a way ... Ionel, Nov 19 2008 I saw this post and was thinking...give it to em! I think posting an e-mail in private ... Wil Reynolds, Nov 18 2008 Clicky is one of my favorite sites to visit. http://www.chillmybills.com melissa, Nov 17 2008 http://www.woodentrunk.cn trunk, Nov 17 2008 I think you will get more users for this whole thing and yes we have all done stupid ... dicenet, Nov 17 2008 Hey Sean, don't be so hard on yourself :) I love Clicky, and I know you're cool. ... Holly, Nov 15 2008