HTML 5 Browser Compatibility Chart - HTML 5 in Old Browsers?
Asked Answered
T

6

11

I have just started considering using the HTML 5 api for a Rails/JQuery project, so I can use that great data- attribute to store values.

I am worried though about browser compatibility issues. I have two questions (basic questions):

  1. In order to use HTML 5, do people need to upgrade their browsers? How does that work?

  2. Is there an up-to-the-day chart of what features each browser layout engine supports, more up-to-date than this Wikipedia article on comparing HTML layout engines and this When can I use... HTML 5 page?

Is it going to be an issue with people using IE6 for example? Lots of non-computer saavy people I've talked to who want to get an internet presence themselves use, and the people they talk to use, still, IE6!

If it's not an issue, and you can use HTML 5 on old browsers, how do you? Or what docs should I look at :)? Thanks.

Update: I will post some interesting links as I find them below.

FindMeByIP: "A simple app which reveals your browsers' support for CSS3 and HTML5 features in an easy to read format using Modernizr." - Browser Support for CSS3 and HTML5

Truth answered 12/2, 2010 at 2:17 Comment(3)
On data- attributes, see #2413447, #5696964 and other duplicates.Noam
On HTML5, see diveintohtml5.org/introduction.htmlNoam
The URL for diveintohtml5 has changed - it's mirrored at diveintohtml5.ep.ioRenoir
O
12

It is not useful to consider HTML5 as a single entity, that browsers either ‘support’ or ‘don't support’. HTML5 is:

  • an attempt to codify widespread existing practice beyond the limits of what the previous W3 HTML and DOM standards had covered, such as IE and Firefox extensions that the other browsers have copied, and long-standing ‘DOM Level 0’ behaviours that everyone took for granted but weren't written into any spec before.

  • a random selection of new extensions not yet in widespread use, which it is hoped browser manufacturers will support. Some have already succeeded, heading into all new browsers already; some have been spun off into their own specifications (which is much more manageable for everyone), some are controversial, and some no-one cares about at all.

It has been, IMO, an enormous mistake to try to cover these two bases at once. I would have preferred an HTML 3.2-style ‘catch-up’ standard plus many separate extension specifications. But there's nothing can be done about it now.

HTML5 is also:

  • Not finished. The specification is massive, complicated, incomplete, and likely to change in details (or maybe more than that) before it becomes a proper standard. No-one can say they ‘support HTML5’ yet, because no-one knows yet what ‘HTML5’ is actually going to be.

In practical terms: there are some parts of HTML5 that have long been in use. There are some parts that you can use safely on modern browsers. There are some parts that you can use on new browsers except for IE. There are many parts you can use with fallback workarounds or ‘graceful degradation’. There are some parts you may never be able to use. For now you will have to learn each separately, because there won't be a browser that supports absolutely everything in HTML5 for many, many years. If ever. Add the extra features you like gradually as you go along and they're supported by a greater share of browsers; there will be no ‘big bang’ where everyone updates their browser at once.

As for data- attributes, well, yeah, you can kind of get away with using them, in that most browsers have always allowed any old attributes to go through anyway. This is typical of several HTML5 extensions, the browser doesn't need to explicitly ‘support’ it for it to work.

But since there are other ways of passing data (classes, comments, script blocks, etc.), I'm not wholly convinced it's worth dropping (universally supported, validatable against a fixed standard) HTML4/XHTML1 pages just for that one feature yet.

Olwen answered 12/2, 2010 at 2:42 Comment(0)
F
10

You might want to check out diveintohtml5.ep.io and modernizr.com.

Modernizr is a small and simple JavaScript library that helps you take advantage of emerging web technologies (CSS3, HTML 5) while still maintaining a fine level of control over older browsers that may not yet support these new technologies.


Here's an interactive chart of html feature support: http://a.deveria.com/caniuse/

As you can see, there are a lot of browsers that support quite a few of the H5 features.

Frisbie answered 12/2, 2010 at 2:20 Comment(0)
F
5

If you're using jQuery, concerned about interoperability, and the only reason you're investigating HTML5 is to use the data-* attribute set, then I would consider switching back to a better-supported doctype and using jQuery's $().data() method, which allows you to bind arbitrary pieces of data to DOM nodes, similar to how the data- attribute set does.

Example:

<button id="set">Click me!</button>

$('button#set').click(function(){
    if($(this).data('name')){
        alert('Clickin\' again so soon, ' + $(this).data('name') + '?');
    }else{
        $(this).data('name', prompt('Hey good lookin\', what\'s your name?', ''));
    }
});

Try it out!

Flieger answered 12/2, 2010 at 3:56 Comment(3)
how does that compare to or integrate with data-?Truth
It accomplishes roughly the same end as data-, except by using JavaScript instead of HTML. In the demo, you'll notice that the results of prompt() are stored as $('button#set').data('name'). This is roughly the equivalent of <button id="set" data-name="viatropos">Click me!</button>Rauwolfia
It actually uses the data attributes where available as well, far as I'm aware.Pestalozzi
H
0

My answer might not be the one you would like but I would say - don't. Don't use HTML 5 just yet.

Holmes answered 12/2, 2010 at 2:27 Comment(2)
The final "practical" feature set of HTML5 will largely depend on what Internet Explorer 9 supports. That in turn will depend on how many sites have already moved to HTML5 (for example, if all the popular sites support h5 video, IE9 will have to support it too). So, the more sites doing HTML5 as soon as possible, the better in the long run. wiki.whatwg.org/wiki/What_you_can_do.Frisbie
If you were to wait till CSS became finalized you wouldn't have started using it till 2 years ago. HTML5 won't become final till there are two complete implementations. And waiting for IE means you may never see HTML5 implemented. So, use the parts of HTML5 modern browsers support and let IE degrade gracefully. Those of us who do are getting along just fine. Otherwise, get out of the way for 10 more years.Sanjuana
G
0

Use Protovis. It uses javascript and HMTL5. No Flash here. More important, Protovis has BSD license. So you can use it in commercial projects. Although D3 is the a newer project that authors of Protovis are working on.

Germinate answered 4/8, 2011 at 9:6 Comment(0)
G
0

Although this is an old(ish) question, the topic of browser support will always be relevant. There's no right way or wrong way to approach it, but take a look through one of the many browser feature support tables that show you what percentage of users will see a certain feature and then be brutal.

Don't try to please everyone. Don't kill yourself to catch a few percent of the Luddite's who are still using IE7. Next year, substitute that for IE8. Personally, I would be happy to lose 8% in order to spend that time on forward thinking practices rather than catering for those who don't know what an upgrade is.

Maybe your site will cause people to upgrade. These people will come round eventually.

Gallstone answered 5/11, 2012 at 18:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.