IE 6.0 *finally* being phased out

In Categorygeneral tech, programming
Bylab

As a supplement to my entry yesterday, Dave pretty much made my day when he sent me this article.

The Internet Explorer 6 browser was released back in 2001, and Internet Explorer 7, the replacement, was released nearly two years ago in 2006. Modern web browsers such as IE 7, Firefox, and Safari provide significantly better online experiences. IE 6 usage has finally dipped below a small minority threshold of our customers, it’s time to finally move beyond IE 6.

If its good enough for 37 Signals, its good enough for me! I found that IE 6.0 had a few more "issues" in my testing, than IE 7.0. Things mostly surrounding some special CSS hovers I was doing with text. The spacing was also a little different. I’ve decided just to spot check IE 6.0, but put most of my focus on the support of IE 7, and the other better browsers. I just wish people would stop using IE in general, and especially IE 6.0. I know a lot of corporations haven’t allowed their user’s to upgrade yet, even 2 years after IE 7.0 was released. So ridiculous!

In ancient Eskimo culture, when an elderly member of the tribe lost their usefulness, they were set afloat on a iceberg, and pushed out into the vast artic sea … never to be seen again.  IE 6.0 is like this elderly Eskimo.  It has lost its usefulness in the browser world, and should just be set afloat … never to be used again.

Why does my site look different in IE? Ruby saves the day (once again)!

In CategoryRoR, general tech, programming
Bylab

For anyone who has ever done any sort of web development, there comes a point where you need to make sure what you are building works the same across all browser types and versions … or at least the major ones.  If you’ve ever spent any time tweaking your code and fighting with the different browser types, you know that Microsoft has done its best to annoy the shit out of you once again with Internet Explorer.  Because it does not adhere to web standards, it always seems to cause trouble when compared to Firefox or Safari.  The spacing is a bit different, and what really bit me this time was a freakish bug in which a background image url will disappear when scrolling, or in my case, I was hiding a DIV and then making it appear with a javascript toggle.  [SIDE NOTE: The scriptaculous javascript classes for Ruby are FANTABULOUS!  So much fun to code and instant gratification because you can see spiffy results super fast!]  I found some great information on common IE css bugs and some possible fixes for them.  In my scenario, I had to change my code for IE, to accommodate the browser’s inadequacies.  I started looking at javascript browser sniffers, but then realized that Ruby on Rails provides a quick and easy way to get the information I needed for a browser check.  The request.user_agent object, contains information on the client’s browser type, version, and even operating system type! 

<%= request.user_agent %>  #=> Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1

So, if I need to adjust my code for IE, all I have to do is check for "MSIE" as part of the string:

<% if !(request.user_agent.include? "MSIE") %>
 … regular code here …
<% else %>
…. stupid IE code here ….
<% end %>

I didn’t want to compromise the design of my site, by changing the code across all browsers.  I wanted to keep my hidden DIV with the fancy pants javascript toggle for all the user’s who aren’t stuck on IE.  Now, the IE users will get the DIV displayed immediately, while all other browsers will have a cleaner user experience, with the hidden DIV, only appearing when they want it to. 

Thank goodness for Ruby, in making this browser check so easy!! The other solutions I found required a nice chunk of javascript with a technique called browser sniffing.  The other way to do it, is by checking what objects or features are implemented by the browser that is hitting the site.  There is a good write up for determining browser type using object detection, with a chart that shows what objects/features set the different browsers apart.  OR …. you can make a simple Ruby call to the request.user_agent object …. SO EASY!!!!  This is the kind of thing that makes coding with Ruby on Rails such a pleasurable experience!!!

Theme Provided By: Warcraft Wordpress Theme - Commercial Space