Skip to content

24 ways to impress your friends

Vote down?


I like the idea of cleanly putting all your CSS hacks in separate files and using Javascript to load them up. I agree that it sucks to do browser sniffing, but these days you have to because even testing if a browser supports a method doesn’t cut it, because it might support it incorrectly!

I found this site to be a real eye opener;

For almost every method available in the DOM, there is at least one browser that doesn’t support it correctly, and 90% of the time that browser has a blue e icon.

I’m thinking of applying your logic to load up custom libraries for each browser rather than have to test everytime I execute a function, if browser a, do this, else if browser b do that.

Something like:
//conditional loads, based on browser detection

(but I might split out the ie.js because between IE6 and IE7 there are a tonne of differences too)