Reputation: 8415
Issue:
I have a Mootools Request object which sends a GET request to a PHP script. The script returns an array of IDs. In every browser except IE each time a new instantiation of the Request object is made it hits the PHP backend script - no problem. BUT with IE it only every hits the PHP script once per browser session. If I clear the cache it flows through to the backend again OK, but after a browser restart or cache refresh.
Question:
Note:
Here's my code:
requestIDs : function() {
new Request({
url : "/identity/idGenerator.php?generate_ids",
method : "get",
onSuccess : function(response) {
this.container.set('html', '');
var idList = response.split(",");
console.log(idList.join(","));
}.bind(this)
}).send();
}
});
Upvotes: 2
Views: 571
Reputation: 53607
You need to prevent IE from caching the request, here is one solution.
And the right solution which is built in mootools is initializing the Request with the config param noCache:true
var myRequest = new Request({...
...
noCache:true,
...
...);
Upvotes: 2