Disclaimer: It is the middle of the night, and I’m still coding. And I’m not happy about it. This post is mostly for venting purposes.
I work on a linux machine to do all of my coding (and, well, everything else). This has so far worked great, with one minor exception. I can’t test photify.net in Internet explorer (easily). So far, my workaround has been to code and test using firefox and chrome, and then when things are nearly complete, hop over to my wife’s win7 laptop to make sure everything looks good. Not efficient, but it has worked alright in the past.
This was basically my process when I pushed out a major layout update a couple weeks ago. Everything looked good on the wife’s computer, so I went ahead and pushed it out. Fast forward to a couple days ago, and I get an email of frustration from a customer that says that “half the shopping cart is gone”. After a ton of troubleshooting later, I find out that she is apparently using IE7 (my wife has IE8), and it was rendering things totally wrong.
Look. I am aware that Firefox and Chrome are standards compliant, and therefore render things “correctly” according to how I have coded the CSS. I am also aware that IE is not standards compliant, and if history is any indicator may never be (although IE 8 is certainly much closer). I have always been in the habit of checking to make sure that the CSS that works for standards compliant browsers work for IE. What I didn’t realize is that a page that works in IE6 (due to IE6 specific workarounds) doesn’t work in IE7, but does in IE8 (due to being more standards compliant). Grrr. Instead of fixing the bugs from IE6, they just made different ones. After a lot of internet searching, I came up with a solution: force IE into quirks mode.
Logic would dictate that forcing the page into quirks mode would have the same effect on all browsers. However, what I have found is that a proper comment in the very first line of the HTML page will confuse ALL versions of IE, sending them into quirks mode, but a standards compliant browser recognizes it for what it is: a comment. Here is what I put as the very first line in all of my pages:
<!--Friends don't let friends use Internet Explorer --!>
Works like a charm.
Leave a Reply