HTML5 vs. XFBML? On an HTML5 page?
Asked Answered
T

2

7

Sounds like a silly question, but...

I'm adding the Facebook Javascript SDK to a site that appears to be in HTML5, it has a
<!doctype html> and a <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> so I'm assuming this was the original authors intent.

However, looking at the Google Analytics for the site, there might be quite a few people using IE8 to visit the site.

We don't want to use iFrames because the XFBML and HTML5 versions are more versatile.

So this is why I am asking if should I use HTML5 or XFBML for the page?

Traverse answered 10/4, 2012 at 19:35 Comment(0)
H
3

If your page is html5 then some browsers won't be supported, if you want to support all browsers don't go with html5, it's that simple.

With that said, I don't think it makes much difference which option you'll go with, and that's because in both cases you are loading the same facebook javascript sdk which then renders the plugin where the placeholder is placed. The only difference between the two versions is how you define the plugin options in that placeholder, in html5 you're using data- attributes, and in the xfbml version you just define the facebook namespace and use custom attributes. But both versions should work for all the browsers that are supported by facebook, the most that you'll get is invalid html in some browsers if you take the html5 version, but it should still work.

Hanshansard answered 10/4, 2012 at 20:13 Comment(2)
Does this mean that if HTML5 doesn't work, then XFBML probably won't work either?Burnett
Depends why it doesn't work. If it's a facebook issue then I suspect that the xfbml won't wort either, if it's a browser issue of not liking the html5 tags, then there's no reason why the xfbml shouldn't work.Hanshansard
R
-1

You should use XFBML as I see you get more IE users on your Google Analytics service, so I assume it is hard to ignore all those users .

Renascence answered 10/4, 2012 at 19:40 Comment(5)
A user has no idea how bad it is until they user something else. Most user get stuck with IE. Give them grace.Originative
Uhhhmm it's the same technology only with additions. For now IE is still here and it would be pretty stupid for a serious developer to just don't care about 10%+ of the users.Pejorative
Yes I loathe IE as much as the next developer, but when it's what your users use, you just have to go with it. After all, users are the reason we have developers in the first place.Traverse
Stackoverflow isn't about opinion, if you want opinion go to programmers.stackexchange.comTraverse
Ok great users I have edited my answer to follow your guidelines, could you upvote it again .Renascence

© 2022 - 2024 — McMap. All rights reserved.