For your post-Christmas hangover, another CanIUse Mashup

This post is more than 2 years old.

This will be short and quick as I've got to hit level 24 on Guild Wars 2. A while back I posted a few demos that made use of data. These demos were kinda nice I think, although not the most prettiest examples of what you could do with CSS. Based on a suggestion from one of the commenters I created something a bit simpler and more direct.

Based on selecting a set of features, this new demo will tell you the minimum version of each major browser required to support those features.

So for example, if form field validation requires IE10 and canvas requires IE9 (I'm not going to rant about this again I'm not going to rant about this again) then the minimum version of IE you can use for both those features is IE10.

Here's a screenshot of this in action. As a reminder, supports multiple browsers. The ones you see here were simply my list of what I thought was critical enough to include in the UI.

Ok, check it out, and let me know what you think.

Edit: Based on a recommendation by Jesse Freeman, I finally got around to adding 'bookmarkability' to the demo. Check this version: As you select options, the URL will change. You can then bookmark and load up that version, or share the URL with others.

Edit 2: After a bug was found in test3.html, I fixed it in test4.html and modified all my links above to just use that version.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA

Archived Comments

Comment 1 by Jeff Coughlin posted on 12/26/2012 at 9:19 PM

Really cool feature Ray. Better than having to sit there with a notepad and have to write all the features down one by one and cross reference manually.

OT: Unfortunately I'm not a big fan of since I often find their data lacking on browsers older than a couple years old (I sometimes have clients that have older browsers with no option to upgrade any time soon).

Comment 2 by Raymond Camden posted on 12/26/2012 at 9:26 PM

Have you tried the settings? I didn't even realize they _had_ settings until recently. It lets you tweak how far back to look.

Comment 3 by Jeff Coughlin posted on 12/26/2012 at 9:39 PM

I did not. Really cool.

I still see the data is wrong though on pages like @font-face where it says FF started supporting it in 3.5. But At least they list their sources. Wikipedia also has it incorrectly marked as 3.5 - where they likely got their information.

I've used font-face for many years now. Funnily enough IE practically invented it when they supported it in IE4 - years before other browsers considered it (granted, it was actually a CSS2 spec first, but it was a rare moment in IE history when they supported a CSS2 spec before anyone else). And FF of all browsers was actually the "last" browser to support @font-face starting in 3.6. Yeah, I know... useless knowledge :)

Comment 4 by Raymond Camden posted on 12/26/2012 at 9:41 PM

BTW, try "test4.html" (same dir) - supports bookmarking. (Waiting for someone to confirm it really works before I edit the post to mention it.)

Comment 5 by Jeff Coughlin posted on 12/26/2012 at 9:49 PM

Works for me (good idea).

btw, those settings on their site are really cool. I keep playing with them now. Thanks for that tip :)

Comment 6 by Randy Edmunds posted on 12/27/2012 at 5:56 AM

Very cool!

How about a feature that scans my HTML/JS/CSS to determine which of those features I'm using? :) Who can remember all those details?

Comment 7 by Raymond Camden posted on 12/27/2012 at 10:33 PM

Heh, I kinda thought about that. In theory I think you could do _some_ of this, like for example, it would be trivial to look for the canvas tag. In theory you could look for certain CSS keywords too. But it just feels like something that would be incomplete and 'fuzzy' to the point of not using. (imo ;)

Comment 8 by Randy Edmunds posted on 12/30/2012 at 7:23 AM

Yes, it's definitely too much for 1 person to take on, but maybe it could be crowd-sourced!

Comment 9 by Raymond Camden posted on 12/31/2012 at 11:37 PM

Hmm. In theory, you write a list of strings and the minimum level browser required browser. So something like this (and these aren't real #s)

canvas={ie:8, firefox:5}

and a list of CSS things

transform={ie:10, etc}

Based on this, you scan for each keyword, and as you find matches, begin generating a minimum browser version required. So using the above examples, if I had both a canvas tag and a trasform item, the minimum version of IE would be 10.

In theory - you write the code and then the 'slow' part is the data file, which others could help with.

Hmm.... I'm tempted to start a Brackets extension for this. It could even provide a report of why IE10 was required. ("Oh, I use a CSS transform - if I remove that I get more coverage...")

Comment 10 by Pete posted on 1/3/2013 at 8:57 PM

Either I've missed the point of this, or it's not working quite right.

If I pick "Canvas", the minimum is IE9.
If I add JSON parsing, it drops to IE8.

But if I use IE8, canvas wont work!

That's not right is it? I'm using Chrome 23

Comment 11 by Raymond Camden posted on 1/3/2013 at 9:12 PM

Damn - you found a bug alright. I'll try to fix it asap.

Comment 12 by Raymond Camden posted on 1/3/2013 at 9:24 PM

Ok, I think I got it now. I've updated the demo link to use the nicer test4.html version.

Comment 13 by Pete posted on 1/3/2013 at 10:46 PM

Getting the same again, with CSS Gradients needing 10, then add Canvas and it drops to 9, Using an iPad 2.

Sorry, it's a great tool though! Do you think you'll keep adding to it?

Comment 14 by Raymond Camden posted on 1/3/2013 at 10:57 PM

To be clear, are you hitting test4.html?

Comment 15 by Pete posted on 1/3/2013 at 11:02 PM

Yes, sorry, I'm not trying to be awkward. It's a cool tool, happy to help if the code's on Github?

Comment 16 by Raymond Camden posted on 1/3/2013 at 11:51 PM

Ugh, this is so frustrating. This *should* be simple math. I'll check it again.

Comment 17 by Raymond Camden posted on 1/3/2013 at 11:59 PM

oh man - got it (not uploaded) - something small and stupid - will post after my meeting.

Comment 18 by Raymond Camden posted on 1/4/2013 at 1:21 AM

So it should be fixed now. Issue was a stupid string to # comparison issue. I wrapped the data with Number() and it worked. This has bitten me a few times lately - I need to blog it.