Hi,
I am using jQuery fullcalendar with Grails. I was using events (as a json feed) earlier and when the user clicks prev/next or changes views the json feed URL is called every time.
Since I need to check the user session also, I changed from events (as a json feed) to events (as function) as shown below. The problem is first time it works, but next time onwards the ajax request is not being send to the server and IE is showing from the cache. If I clear the browser cache, then it gets it again from the server.
So the problem is, IE is caching the event objects. Can I know what I am doing wrong? Strangely this works fines in Firefox and Chrome.
//events: calendarEventsURL
events: function(start, end, callback) {
$.ajax({
url: calendarEventsURL,
data: {
start: Math.round(start.getTime() / 1000),
end: Math.round(end.getTime() / 1000)
},
success: function(msg) {
if(msg == "no-session"){
$("#wait").html(invalidSessionMsg).fadeIn('fast',function(){
$("#wait").fadeOut(2000,function(){
window.location= "/" + $("#appName").val() + "/";
});
});
} else {
var events = [];
for(var c = 0; c < msg.length; c++){
events.push({
id: msg[c].id,
title: msg[c].title,
allDay: false,
start: msg[c].start,
end: msg[c].end
});
}
callback(events);
}
} , error: function(){
$("#wait").html(errorMsg).fadeIn('fast',function(){
});
}
});
}