Hacker News new | ask | show | jobs
by electrichead 4737 days ago
I think most people use conditional comments for IE and don't bother with user agent strings. I do, anyway.
1 comments

Many people use conditional comments, but I wouldn’t go as far as saying most use them. There are tons of browser sniffing scripts out there on the web. I used to have to deal with them all the time when doing web site compatibility for Opera. They wouldn’t have made this change if they didn’t need to.

It is the same situation with hiding support for things like document.all, so they avoid the sniffers that do: if (document.all) { ie = true; } then use the ie variable to give those browsers the legacy IE code path.