"IE Sucks" Series continued

Last days, I was developing a pure Ajax JS component from scratch that should work cross browsers, I really found nightmares during my way because of the ugly bad stupid IE.

One of the bad IE stupid features that really suck is the IE Ajax Caching.

UnLike FF, If you are trying to send simple Ajax GET requests to your server servlet, you will find the stupid IE returns stale old request data.

After spending one hour in investigation, I found the way that got me out of this hole.

To solve this problem you should add a random dummy parameter to your GET url request to force IE to refresh itself.

For example)

var url = "/RichTextEditorWorld/ImageUploaderServlet?ieDummyStupidParameter=" + new Date().getTime();
This entry was posted in JavaScript, Web 2.0 and tagged , by hazems. Bookmark the permalink.

About hazems

Hazem Saleh has more than eleven years of experience in Cloud, Mobile and Open Source technologies. He worked as a software engineer, technical leader, application architect, and technical consultant for many clients around the world. He is an Apache PMC (Project Management Committee) member and a person who spent many years of his life writing open source software. Beside being the author of the "JavaScript Unit Testing" book, "JavaScript Mobile Application Development" book, "Pro JSF and HTML5" book and the co-author of the "Definitive guide to Apache MyFaces" book, Hazem is also an author of many technical articles, a developerWorks contributing author and a technical speaker in both local and international conferences such as ApacheCon North America, Geecon, JavaLand, JSFDays, CON-FESS Vienna and JavaOne. Hazem is an XIBMer, he worked in IBM for ten years. Now, He is working for Nickelodeon New York as a Mobile Architect. He is also an OpenGroup Master Certified Specialist.