Gossamer Forum
Home : General : Perl Programming :

CGI Cache?

Quote Reply
CGI Cache?
Hi thereSmile

I am calling a cgi script file with the following "AJAX" function:

Code:
function xmlhttptrustPost(strURL) {
var xmlHttpReq = false;
var self = this;
// Mozilla/Safari
if (window.XMLHttpRequest) {
self.xmlHttpReq = new XMLHttpRequest();
}
// IE
else if (window.ActiveXObject) {
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
document.getElementById("contenttrustContainer").innerHTML = "Waiting...";
self.xmlHttpReq.open('POST', strURL, true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.onreadystatechange = function() {
if (self.xmlHttpReq.readyState == 4) {
updatetrustpage(self.xmlHttpReq.responseText);
}
}
self.xmlHttpReq.send(gettrustquerystring());
}

I'm sending different parameters to the cgi-script depending on what I want it to do.
The functions are carried out correctly, but now and again the script returns the result of the previous request.
For example:

a request is sent to get 10 random users. The result is recieved and displayed inside a <div> element.
Now, a request for 20 forum posts is sent, but the result recieved is the 10 random users requested before.

It doesn't happen all the time. Just, lets say every 8 to 10 time a request is made, it happens. It's not a big issue,
but it is irritating. Can anyone maybe explain it to me?

Thank youWink


Sacrifice is not about what you lose,
it is about what you gain in the process.