Best Practices

Stripping down for IE6

2

This is a big subject for me as it’s very annoying, IE6 is a pain in the arse, and it always has been, my previous posts will tell you how much I hate the browser.

Recently I have been working on CSS/JS based graphs. The designs for these graphs are amazing, but I shuddered at the thought of porting transparent PNG’s over to IE6 to make this work, and the unforeseeable problems faced by using css/js “hacks” to add certain features to a browser that never fully supported it.

My solution is this… use what’s there, don’t even think of enhancing it. By adding support for transparent PNG’s for a browser that doesn’t fully support it seems silly to me, and goes against my rule of not modifying the browsers default behavior. Why should we keep entertaining IE6 and nudging along a dying horse, whilst we shouldn’t take a shotgun and shoot the fucker point blank in the face, there’s no point in attempting to enhance it and add support by using IE7 support JS to make IE6 behave like IE7.

If you’re more of a visual person, here are a few graphs to show you what I mean…

bad

This is a graph to show the headache caused when trying to backward port features from modern day browsers to IE6

This is a graph to show what should actually happen, IE6 development should stop where the features are no longer supported, i.e. transparent PNG's, then you can enhance the experience for people who don't use "broken" browsers

This is a graph to show what should actually happen, IE6 development should stop where the features are no longer supported, i.e. transparent PNG's, then you can enhance the experience for people who don't use "broken" browsers

We should seriously take a look at this and consider what we’re doing here, by supporting dying browsers we’re encouraging people and companies not to upgrade their browsers, we’re supposed to be driving technology not dragging it by it’s heels.

Let me put it another way… if Microsoft didn’t screw up IE so much we would be doing things like this now! Without Flash!

JS – Adapting to the situation (smart coding) with Portlet’s

4

Preface

For the past few months I’ve been workin with a content management portal to deliver my XHTML/JS/CSS I can’t stress how big a pain in the arse this is, as with any CMS there are limitations in the way that it works and problems when you try to use it for more than what it’s really made for. Limitations of a CMS can include:

  1. not being able to add code/css to the header
  2. the CMS just spitting out any old JS/CSS in the HTML
  3. HTML not being formatted correctly, or just spitting out random XHTML tags

The list could go on, but I’m too tired to really carry on. It puts a big downer on you most of all when you’re so anal that all of your HTML is well formated and perfectly indented, only to find when the site goes live, all of your code is on one line or it looks like it’s been run over by a bus.

My main concern with coding for CMS’s that use portlet’s is the simple fact that each portlet is in essence it’s own self contained application/controller. It becomes a pain when you have to constantly check to see whethter a portlet exists in the DOM on runtime.

How can you work around this? Think like a CMS. You might be thinking, what the f**k is he talking about? The simple solution is to adapt the way you code to suit the CMS. Instead of having one big JS file for a page or site section, seperate your code into small chunks, this will also help you unit test your code which I’ll come to a bit later.

(more…)

Dealing with IE6

7

Just like pretty much every single web developer out there, I hate IE, regardless of it’s version. IE7 made great leaps and bounds over IE6 but it was still stupidly buggy. How do you get around the annoyances of IE?

The guys over at ie6update.com have a great solution by emulating Internet Explorers information bar and giving users the bait to upgrade to IE7/IE8.

Although I’m all for this idea there are obvious problems here

The majority of users who are still using IE6 are either within corporate networks, where they will more than likely never have the administration rights to upgrade to IE7/IE8 or they are just too stubborn to upgrade to the latest version of IE any way, or they’re of course, using an older version of Windows and can’t be bothered or don’t want to upgrade to the latest OS (I can see why).

(more…)

Go to Top