Tag Archives: web

Browser compatibility: Look at your market!

8Today I want to talk about a topic a bit touchy, the web browser backward compatibility. And in particular a strange behaviour: “The worldwide market share analysis followers”.

This is for me the biggest mistake in the web development when trying to figure out what to do and setup a backward compatibility plan. For the purpose of this article, I’ll take a case I personally had to face today. I’ve quickly developed with Bootstrap.js and JQuery a beautiful and reactive CV web site. It took me about 5 hours max, deployment to the Microsoft Azure cloud included. But before going live I would like to test it against different browsers to be sure about the displays. It’s okay for the Chromes, Firefox’s too, on my android tablet with integrated browser and chrome browser too, on my android samsung mobile too and then, the horror ! It totally sucks with IE 8 and lower… well… Let’s take a look at the famous “worldwide browser market shares” to figure out the impact of that. I use one of the reference analytics website, allowing me to export datas as csv and play a bit with Excel. The complete spreadsheet book is available for download at the end of this article. Here’s the world wide top 20 browsers in terms of market shares:

WWShares

Okay but who’s compatible? I’ve aggregated these market shares based on the compatibility and assuming that the ‘other’ part wasn’t compatible to face the worst case:

WWCompatible

Damn, 20%… I’ll need to take that in account… that’s pretty huge… So I’ll need to dev… STOP ! Who am I really targeting with my CV website? Well, future client and recruiters, mainly in Belgium… So let’s refine the results and take a look at the Belgian situation instead, perhaps it’s better:

BEShares BECompatible

Only 10% remaining… And now let’s refine again the analysis by testing the “others” in terms of compatibility :

BECompatibleOthers

Only 6% of possible incompatibility in the worst case… Well… That’s acceptable for me. The site will work fine in terms of content, just some features will be a bit ugly and the user experience will perhaps suck a bit, but anyway, most of the viewers will have great experience on it.

So will I spent the same amount of development time to the backward compatibility feature? Well, perhaps in the future, but it’s really not a priority.  If my target was the entire world, then yes I should, but let’s be honest, I don’t really care about Chinese or Russian recruiters. So what’s the point of these graphs excepted playing with Excel ?With this I really want to demonstrate you two things:

First, when you have to be backward compatible, don’t do it because you have to and everyone say it’s great to be, but because you have to. This point lead me to the second, always define and keep in mind your audience and don’t work based on “global datas” or techies chatting. That’s true for web development but also desktop applications, trainings, writing, everything! It sound obvious, but once again let’s be honest, who had never spend too much time on features or improvements who appears to be useless or minor once in production?

To conclude, keep that in mind: Know your target and it’s always better to develop for the future than develop for the past !

Catch you next time and keep it bug free !

You can download the Excel doc here

Reload IFrame and manage Same-Origin policies with JQuery

jquery-logoFor a project, I had to dynamicaly reload an IFrame (within a JQuery dialog box) and include cross domain pages.
To load the IFrame and set the source :

$(FrameID).attr("src", URL);

To reload the IFrame you can use :

$(FrameID).contentDocument.location.reload(true);

But if the content come from another domain you will be denied access to the iframe’s contentDocument property due to the same-origin policy.
To force the cross-domain iframe to reload if your code is running on the iframe’s parent page, you can set it’s src attribute to itself.

var iframe = document.getElementById(FrameID);
iframe.src = iframe.src;

But be carefull, this is a hack ! So if you do something like this in production code, comment it, or the next one would probably remove this code who seems totally useless.

Projet : Kouak – HTTP File Share Server

KOUAK ! KOUAK !
Kouak is a basic portable file share server over http. He let you share easily files in heterogeneous environments and in just few clicks. He doesn’t need installation and run on every machine from windows xp sp2 to windows 7.

Why use HTTP for sharing ?
HTTP is the most common naively supported protocol. He’s also easy to “use”. For comparison, try to ask to your grand ma’ to install an ftp client and then configure the timeout (cause your file is 1.2go) and then connect to the server, browse the file and find the one she needs. In your side you have to setup/start the ftp server, configure a new user, give her the access, set the permissions…
With kouak you just need to run, give the url, and ask her to go to internet on the url and download the file as she usually do.
It’s easier isn’t it ?
The other advantage is the plurality of OS available. When we use windows share, it’s ok in a windows environment. But if you have linux, bsd or MacOS computer, you need to install a lot a crappy services and drivers to try to access to your share.
HTTP : connect and download from anywhere in anycase !

Page du projet : http://kouak.codeplex.com/

(Cherche traducteur fr/anglais ! )

Inform@tiquement

Manu404