Weird Thoughts From Eric's Head

Tags - Categories : All | AJAX | BUSINESS | PERSONAL | PROGRAMMING | BOOK REVIEW

"I support IE5 with Ajax!" Do you really? You better think about that!

It is Friday so I thought I would blog something on the lighter side and this topic always makes me chuckle. Sometimes it is hard to keep a straight face. I always laugh when I hear someone say that there Web page uses Ajax and it runs in IE5 and up. I normally ask them if it was tested under IE5 and they normally say no.

I actually can test IE 5 since I am insane and have windows 98se installed as a virtual machine. You should have seen the network guys when I asked for a 98 disk. (Sad thing is they had it!) I run it full screen on my second monitor and people take a double take when they see it!

The reason why I think it is funny people think that their code will run in IE5 is based on one thing. The documentation says that the ActiveX control for the XMLHttpRequest Object is supported. I can say that you can run Ajax applications on IE5 with the XHR and it does work.

But what developers tend to forget is that IE5 is not running the world’s best version of JavaScript. The OO techniques of apply() and send() are not supported. So things like my content loader I use does not work. Simple array techniques of shift and unshift are not supported. So unless you are prototype happy and want to add Array.prototype.shift and Array.prototype.unshift to your helper files, than you are not going to support IE5. There are a lot of small things that are missing from the objects that you really would have to read documents or find some crazy guy that wrote a helper js file.

Should you think about supporting IE5? Well I personally do not support anything under IE5.5 since I do not have time to waste trying to get a small amount of users running. Now looking at my logs and such I do see windows 98 with IE5 hitting my website all the time. So I might be shooting myself in the foot by not supporting them. One day I might drink enough beer and may think about attempting it.

This is why I fear JavaScript 2.0 coming out. How in the world will we be dealing with that cross-browser coding problem? Talk about 2 sets of code bases to deal with! Everyone needs to realize JavaScript is not a plug-in that can be easily updated so we are stuck with older browsers with old version of JavaScript. Make JavaScript a plug-in people! LOL! Oh wait then that might be a patent issue! LOL!

Have a good weekend! Stay out of trouble and get some sun! Turn on your wireless card and program outside for a change! Heck I might wipe my harddrive clean of XP and install 98se since it is very stable! Ah, I thought you needed a good laugh.



Eric Pascarello
Coauthor of Ajax In Action
Moderator of HTML/JavaScript at www.JavaRanch.com
Author of: JavaScript: Your Visual Blueprint for Dynamic Web Pages

Well I got a few emails asking if I was drunk when I wrote my post yesterday. They said you do not have to use the abort method. Keep on reading to find the better solution for reuse!

Read more...

Looking for user groups

I am always on the look out for places to talk. I live in the Washington DC/ Baltimore region and love to talk at local user groups. If your group meets during the week I am willing to do short drives to do talks. If you meet on the weekend, I am willing to drive a little further.

So if your local user group is looking fo someone to talk about Ajax and JavaScript for 1.5 - 2 Hours I am willing to do it. Contact me at askEric@pascarello.com and we will see what we can arrange.



Eric Pascarello
Coauthor of Ajax In Action
Moderator of HTML/JavaScript at www.JavaRanch.com
Author of: JavaScript: Your Visual Blueprint for Dynamic Web Pages

One thing I see popping up over message boards is people want to reuse the XMLHttpRequest Object instead of creating a new instance every single time. Some developers think this will help in memory leaks. I have not tested it in any way to see if it really helps. But I thought that I would show you it is possible to reuse the same object over again and again with Internet Explorer.

For this code I am going to be using a very basic example. I am not going to use OO code so just bear with it. With Firefox you are able to reuse the XMLHttpRequest object without this craziness, but with Internet Explorer 6 you are not able to do that (I have not tested this in IE 7 yet so hopefully someone will comment on the reuse factor!) If you want to see the code in action keep on reading!

There is a better solution that this posted here: http://radio.javaranch.com/pascarello/2006/03/31/1143817890773.html. So you can read this just to see the wrong way of doing it and the right way is on that link!

Read more...