SetTimeout not working with IE

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shan

    SetTimeout not working with IE

    Hi...

    I am trying to get progress of a backend task, which is initiated from
    web gui....
    To achieve it i am using Ajax. To get recent progress of backend task,
    i am calling the same Ajax function using setTimeOut after some x
    seconds.

    This logic is working very fine in Firefox, Safari. But when i tested
    my application in IE. It seems like the setTimeOut function is not
    considering the second argument in it.

    Ajax function is called frequently, irrespective of secong argument to
    setTimeout("fn( )",5000)


    What may be the problem....?



    Advance thanks for any help.

    Regards,
    Shan

  • David Mark

    #2
    Re: SetTimeout not working with IE

    On Feb 22, 8:34 am, Shan <m.shanmugara.. .@gmail.comwrot e:
    Thanks.
    You're welcome. Please don't top-post.
    I fixed the problem. The reason is Ajax response Cached by IE.
    So i didnt get the proper progress info.
    To overcome the problem i have used post method over Ajax request.
    That is one way to do it, but it is an end-around.

    You might try something like this instead:

    xmlhttp.setRequ estHeader('If-Modified-Since', 'Sat, 1 Jan 1990
    00:00:00 GMT');
    xmlhttp.setRequ estHeader('Cach e-Control', 'no-cache');

    [snip]

    Comment

    Working...