Internet Explorer rage

Hello, I am having a terrible day with IE, despite thinking I had the whole cross-browser thing cracked.
First of all there is the issue of the cache (any version of IE). There seems to be no 100% reliable way of forcing IE to load the newest version of files, particularly linked css files (I just happened to notice). You can try everything, and STILL the stupid thing insists on loading a page that hasn’t existed in that form since 1996 :mad:
Then there are the conditional comments. Conditional comments are wonderful when they work, but when you have more than one IE on a machine they get gnarly. The latest explanation I read is that it defaults to the latest version. You can edit the registry to work around this, but I haven’t been bothered yet (I probably should).
So there I am with some stuff in conditonal comments, and things aren’t great but at least I’m managing to target IE7. But today I decided to install IE8 again, despite vague and uneasy memories of having to UN-install it a while back.
Conditional comments stopped working at all.
I read that inline stylesheets will stop linked stylesheets working but I have no inline stylesheet.
I read that forcing it into IE7 compatability mode will fix this, but I was trying to develop for IE8, thinking “at least people with the LATEST IE will see the right stuff”. It also completely broke some jquery I was using.
And now there is some awful bug with top margins in IE7 and IE8, my conditionals aren’t working and I have removed ALL the markup I spent 2 days working on.
I’m so desperate I’m considering signing up for Litmus, but in the past online browser suites have displayed exactly the same problems so I’m wary of spending the money. Alkaline (desktop app) also seems to be broken.

It’s not my week! I hate Internet Explorer so much now! Something about the advent of CSS3 has finally made me snap and reduced my tolerance of it to nearly zero. For heavens sake, the latest version of it seems to cause so many problems and have as many oddities as IE6. It makes me want to scream!
:frowning:
</rant>

Well, the thing about the conditional comments on the latest IE I seem to recall was something to do with particular installations like evolt or Tredosoft multiple IEs. IMO something like a Virtual Box is a better deal: each OS has one and only one copy of IE, letting you have 6, 7 and 8 separately.

Conditional comments can be simple like if IE, but whether they work on one version should depend on whether you said
if lte IE6 (hits IE6 and below like the Tan hack does * html #element {styles;})
if lte IE7 (give IE8 regular code and IE6 aned 7 get your “special” code… like having both

  • html #element {style;} and *+html #element {styles;}

or something like that.

The conditional comments for IE6 seemed to work fine on my Tredosoft IE6 while not hurting my “native” IE7.

The stylesheets: inline styles will override external styles, yes.

An external file called by <link> gets overridden by embedded styles in the <head> inside <style> tags, which get overridden by actual inline <div style=“somestyles;”>

If I were you, working for three versions of IE, is build your site for IE8 and the other browsers (at the same time). Check regularly in IE6 and 7 (again, I recommend a virtual box if you don’t actually have more than one machine… you may need a dual core processor or something, that’s what I have) and try to keep any hacks inside hacks (either an IE stylesheet OR using the hacks I listed above). Ideally you would find other ways of saying the same thing but in a way that IE is happy with, rather than actual hacks.

Regarding jQuery, they do make it to be cross-browser compatible, but IE8 has its own Javascript bugs. You can read about them on James Hopkin’s IE8 bug page… forget the url, something like
idreamincode.co.uk
but I’m not at my computer…

To avoid the condcom issue, maybe you could stick with one IE installed and use IEtester to check in the others?

Then there are the conditional comments. Conditional comments are wonderful when they work, but when you have more than one IE on a machine they get gnarly. The latest explanation I read is that it defaults to the latest version. You can edit the registry to work around this, but I haven’t been bothered yet (I probably should).

Sounds like you have a corrupt installation of some sort or are using the old versions of the IE standalones. IE8 has very few CSS problems and works fine most of the time.

You should only have one real IE version running so what are you using to test with?

I would get a clean version of IE8 running but get rid of any old IE stuff.

Then just download ietester which is fine with conditional comments and most everything else (although it is a little unstable - but it just crashes and you start it up again).

Or use the internet collections suite instead.

If i recall correctly, iEtester has a problem where IE8 instance doesn’t work if you have XP and not IE7 installed …

I have the real IE8 installed on xp and you are right that IEtester doesn’t really like that set-up because it crashes a lot.

However it starts straight up again without problem. I had no problems before when IE7 was the main browser and then used IEtester to test IE8 so having IE7 as the main IE is probably best.

Yup, that’s why i haven’t upgraded to 8 yet :slight_smile:

I have native IE8 installed and then just IEtester for IE6/7 (though it has 8 on it)

I never even get crashes (XP)

Oh, hi everybody, I didn’t know I had any replies or I would have posted more.

I solved my problem in the end: instead of using conditionals to link stylesheets, just use them to put inline stylesheets in the <head>. Everything was then fine in IE8 - although I forced it into IE7 emulation mode with some <meta> code I found recommended somewhere as I don’t have IE8 & 7 together, so perhaps that helped?
(PS: I had no inline css of any description before this).

I noticed the IE8/jQuery bugs - I think I did use jQuery in the end, but my own, coded from scratch in situ simply to insert some new html elements I could style. Previously I had been using a script I found that created rounded corners- and it failed miserably in IE8.

I think the conditional comments / linking problem was responsible for my “cache problem”. That is to say it just wasn’t loading the linked files any more after upgrading to IE8 from IE7 mid-design. Perhaps there were cache problems at the beginning - I work for a big company website most of the time, where time and again we have had cache problems with internet explorer. Editors have been known to resort to borrowing other people’s computers to view changes. Yes, we know how to empty the cache and sometimes it works. I think this also may have something to do with the server but - only IE is the only browser where we ever have a problem.

Usually I would indeed recommend incremental design, checking IE at every step. This brings me on to the other point - what my setup is.

I indeed use a virtual machine running XP to test IE because I’m on a mac. I upgraded to snow leopard just as I began my design - which originally had a very tight deadline too. I wasn’t at all expecting how much quicker and easier it has been to start up Parallels since the upgrade, or I may have used IE more early on. Being pressed for time, I avoided it for the first few days! Even now it has its moments - at 5.30 on Friday an editor from work was expecting some last-minute changes before she left for a holiday, and at 6.10pm I had to email saying ‘just managed to boot up Windows, sorry’ (I had to use IE for the task). It used to slow my machine to molassess and mean I had to quit a lot of open applications to use Windows as well. Not so bad now.

The multiple IEs I use are just called “Multiple IEs”, they just sit in a folder on the XP desktop: IE3-6, every single release. They normally all work fine, can’t remember where I got them from. They were free. Perhaps there is a better way - but then again, perhaps I should do that registry trick so conditional comments work properly. (Free solution!).

I also eventually figured out how to use Alkaline, but as the free version only includes IE7 I don’t know if it has similar issues with conditional comments. In the past other online services HAVE had the same problem.

Oh, and usually there would be a windows laptop somewhere I could borrow… but it broke. :frowning:

The multiple IEs I use are just called “Multiple IEs”,

Yes they were the ones that were broken and CCs don’t work along with a number of other features. I would get rid of them and use one of the ones we linked to above instead :slight_smile:

Yeah I have IE8 installed too and I have to open them in order of 8 > 7 > 6. if I go out of that order I risk a crash.

OP, instead you could go with one of these directions to feed IE (method 6 is the best).

Good summary Eric :slight_smile:

The last one (the php sniffer) looks good but stops you using another body class. Wouldn’t it have been better to modify it so that it’s set up just to add the class to an existing body class attribute.

e.g. Something like:


<body class="home <?php echo $browser; ?>">

You’d have to re-jig the php a bit of course.

Thanks Paul :slight_smile: As is, it looks like you could change the php to use an id on the body instead. Or you could just use an id and the ie class together obviously. Post #8 here looks like it would enable your multiple class idea. You would just have to add your chosen class to the php in the body tag and then the ie class “should” add itself in there. Other than that, thats a job for some PHP guy (admittedly that’s not me).

well those sound like some good ideas, I’ll check out the alternatives.

Using php to detect browsers and operating systems sounds interesting - not entirely sure I’m following what you’re saying here, probably need to read that other thread to understand. If php can detect browsers, different style sheets can be served up. Yes, different classes and/or ids can be used too. Sadly this was only tangentially a php project (wordpress template) but there do seem to be possibilities for adding extra tags and so on in IE by using php, instead of using jQuery. This is my first ever attempt with wordpress though. Of course the only reason I needed jQuery in the first place was because I needed more tags than the widgets provided and with enough knowledge of wordpress (and php) I assume I could have fixed that.

Oh, and the other thing was widgets that produce crappy broken inadequate html! Certainly made the barrier-to-entry for widget/plugin writing seem pretty low. But that’s another rant in the making…

EDIT: looks like I missed more posts here - thought I had read them all - sorry! I have a lot of homework to do, obviously! But if it saves me trouble in future it will be worthwhile - thanks very much.