If you are a web developer, maybe this post title doesn’t say nothing new to you. But I’m really really tired of IE annoyances. Today  I worked extra hours on an ajax problem with IE.

The page I was working on has an ajax call like this one:

<div id="LoginForm"> </div>
<script type="text/javascript">
  new Ajax.Updater('LoginForm',
    '/www.php/login/ajaxForm'),
    {asynchronous:true, evalScripts:false, method:'get'})
</script>

Well, is the typical prototype ajax call. The call updates the “LoginForm” layer with the information of the user: if he is logged or not basically.

Everything works right on every browser. I remark: on every browser, except of course IE. Explorer has the bright idea of use always his cache to fill the layer, so when the user logout, and go to another page, the “ajax call” shows the cached content, and voilá: the user is logged in again!

Here the solution:

<div id="LoginForm"> </div>
<script type="text/javascript">
  new Ajax.Updater('LoginForm',
    '/www_dev.php/login/ajaxForm?rdm='+Math.floor(Math.random()*10000),
    {asynchronous:true, evalScripts:false, method:'get'})
</script>

It’s pretty obvious knowing the problem, but anyway is ANOTHER annoyance!

Thank you Microsoft, for these great moments.


One Comment on “Internet Explorer: what a big mess! (Part 1 of n)”

You can track this conversation through its atom feed.

  1. jzarate says:

    Just a suggestion.

    Try to put some indication of what the post is about on the title.

    This way, if someone is fighting with the same issue, he’ll have more chances of finding the post by googling it.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>