建设门户网站的公司,网络营销推广方法和应用场景,运用asp做购物网站的心得,那个网站有免费的模板今天遇到ajax缓存的问题,指定同样的url和参数值总是有缓存#xff0c;跳不到后台程序里#xff01; 我先用了一种龌龊的方法,就是在url后又加了个由数据数产生的参数var randMath.random();var urlA.aspx?tescape(t)rescape(rand); 不知道大家…今天遇到ajax缓存的问题,指定同样的url和参数值总是有缓存跳不到后台程序里 我先用了一种龌龊的方法,就是在url后又加了个由数据数产生的参数var randMath.random();var urlA.aspx?tescape(t)rescape(rand); 不知道大家有没有什么好办法 ----分割线----------- 解决办法 在Page_Load中加入 Response.Buffer true;Response.ExpiresAbsolute System.DateTime.Now.AddDays(-1);Response.Expires 0;Response.CacheControl no-cache;Response.AddHeader(Pragma, No-Cache);-------myAjax-------//url:处理地址data参数progressobj等待提示successfun返回执行function myAjax(url, data, progressobj, successfun) { $.ajax({ type: post, url: url, data: data, beforeSend: function(XMLHttpRequest) { //ShowLoading(); $(# progressobj).show(); }, success: function(msg) { successfun(msg); }, complete: function(XMLHttpRequest, textStatus) { //HideLoading(); $(# progressobj).hide(); }, error: function() { //请求出错处理 } }); return false;} 转载于:https://www.cnblogs.com/tenghoo/archive/2007/04/26/728660.html