AJAX GET requests being cached

Due to some browsers caching AJAX GET requests I have added the following bit of code.

if(k){
    x.open('POST',c,true); x.setRequestHeader('Content-type','application/x-www-form-urlencoded'); x.send(k)
}else{
    if(c.indexOf('?') == -1){c += '?'}else{c += '&'}
    c += 'timer=' + new Date().getTime();

    x.open('GET',c,true); x.send(null)
}

This is a great script.  Thanks very much for your efforts.

Steve

asked Jul 12, 2012 by eqnet (120 points)
edited Jul 12, 2012 by eqnet

Your answer

Email me at this address if my answer is selected or commented on:
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.