views:

105

answers:

2

After creating some web-apps...i really think dealing with conditional comments is not fun after a while. Are there any Plans regarding this issue? Is it going to be more complicated or more easier to handle different browsers?

+2  A: 

I take it you mean browser-specific code implemented via conditional comments:

I suspect we're stuck with them, though it would be a better world for all of us if browsers just behaved correctly, fully implemented standards, and rapidly and accurately adopted new relevant standards. :)

The thing is...that's never been the case, and given the commercial motivations involved I don't see that changing. Looking through our code bases, it feels like the last few years were better than the bad old days, but of late things seem to be heading in the 'wrong' (read: browser-specific) direction, with more browser-specific CSS in particular.

So, in short, it's not fun AND it's going to be this way at least until the pace of innovation slows again.

DarkSquid
+2  A: 

Some form of capability-sniffing will always be needed, but hopefully in the future this can be based more on the more benign forms of scripted object-sniffing enabling progressive enhancement.

Conditional comments are used today to get around bugs in basic HTML and CSS handling. But those bugs are going away. The vast majority of cases where CCs are actually needed are for IE6; occasionally you also need to use them for IE7. IE8, on the other hand, mostly agrees with the other browsers on HTML and CSS rendering issues (as long as you're running it in real IE8 Standards Mode).

I've personally never needed a CC for IE8. As IE users upgrade to the newer versions the need for CCs should decrease and hopefully one day may go away completely. Admittedly this migration is going incredibly slowly so far, but think how much worse things were when we still had to consider IE5...

bobince
+1 yeah...it is true that things turn better with every new version. But it will take a long time.
bastianneu