Ajax中要注意的问题
清醒时做事,糊涂时读书,大怒时睡觉,无聊时关注图老师为大家准备的精彩内容。下面为大家推荐Ajax中要注意的问题,无聊中的都看过来。
解决办法:
prototype的GET中,设置
pars = "mod=readArticle&fid='+$F('fid')+'&rand='+Math.random();
使用java提供的方法设置http头信息,在jsp或者servlet中都可以
response.setHeader("Pragma","No-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires", 0);
使用HTML标记,如下:
HEAD
META HTTP-EQUIV="Pragma" CONTENT="no-cache"
META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"
META HTTP-EQUIV="Expires" CONTENT="0"
/HEAD



