Is there anyway to delete my browser cache on post-back programmatically? I am using a jquery function that use ajax on a button click with cache:true
function CallSyncAjax(url, args, resid, EnableCache, ErrorDivID) {
$.ajax({
type: "GET",
url: url,
data: args,
cache: EnableCache,
success: function (data) {
var StrResponse;
StrResponse = data.split('@@@');
if (resid == "1001") {
LoginByAccountRes(StrResponse[0]);
}
}
})
}
C#:
protected override void OnLoad(EventArgs e)
{
// Set Cacheability...
DateTime dt = DateTime.Now.AddMinutes(1);
Response.Cache.SetExpires(dt);
Response.Cache.SetMaxAge(new TimeSpan(dt.ToFileTime()));
// Complete OnLoad...
base.OnLoad(e);
}
the problem is that whenever I refresh the page after one minute and even when I close the browser and reopen it the cache still existed