I have in my HTML documents a style comment line ("if IE 5") for Internet Explorer 5 that I'd like to eliminate.
With IE 5 having such a tiny share of total browsers in use, would it be acceptable to get rid of that code?
It's just one more thing I have to pay attention to if I want to make any changes and the coder I hired said that it could not be included in the external style sheet, so it's on every page, which is a pain.
the coder I hired said that it could not be included in the external style sheet
That's not entirely accurate. Almost any type of code can be included in external style sheets -- it's just a matter of settings in the config file if it's an Apache server. Just configure Apache to parse .css files for code such as php.
But most important is what was the purpose of that IE5 detection -- what functionality will potentially be affected without it there?
The reason I am asking you what functionality will potentially be lost is because if that "style comment line" was written into an old HTML document when IE5 was the current version of IE then it's possible that functionality still doesn't work in version 6 or even 7 yet. So instead of just version 5 to worry about you also have to be concerned about version 6 and 7 too. Then the small market share can add up to 5-6%. That's significant enough to consider leaving it in, or modifying it to include versions 5-7.
Maybe an example will help because this is something I am digging into myself right now as we speak and as you posted that's why I jumped on it so quickly:
I'm in the process of investigating the potential of transitioning to a new way of adding smaller sized images to my html docs by encoding them into Base64 ("data:image/jpeg;base64,/9j/4AAQSkZJR..."). My reason is to cut down on page load times by having fewer HTTP requests sent to my server.
But I don't like mixing code with css so I have to weigh all my options. Hope this helps you understand my question better.
Msg#: 4492965 posted 3:44 am on Sep 14, 2012 (gmt 0)
If that's the only code you have for IE5 scrap it, it doesn't define anything you haven't already in your regular style sheet. Also agree check your stats to see if it's worth maintaining. Personally I only style for IE6 and up but, thats based solely on my stats.