欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

AJAX防止頁(yè)面緩存的代碼

 更新時(shí)間:2007年06月03日 00:00:00   作者:  
采用AJAX技術(shù)的時(shí)候 通常我們無(wú)刷新頁(yè)面提交數(shù)據(jù)后 用同樣的url去獲取數(shù)據(jù)的時(shí)候會(huì)發(fā)現(xiàn)是以前的數(shù)據(jù)~那樣就給client端帶來(lái)假象了~~ 采用以下的方法可以取消緩存 
htm網(wǎng)頁(yè) 
<metahttp-equiv="pragma"content="no-cache"> 
<metahttp-equiv="cache-control"content="no-cache,must-revalidate"> 
<metahttp-equiv="expires"content="wed,26feb199708:21:57gmt"> 
或者<metahttp-equiv="expires"content="0"> 
asp網(wǎng)頁(yè) 
response.expires=-1 
response.expiresabsolute=now()-1 
response.cachecontrol="no-cache" 
php網(wǎng)頁(yè) 
header("expires:mon,26jul199705:00:00gmt"); 
header("cache-control:no-cache,must-revalidate"); 
header("pragma:no-cache");  
jsp網(wǎng)頁(yè)
response.addHeader("pragma", "no-cache");
response.addHeader("cache-control", "no-cache,must-revalidate");
response.addHeader("expires", "0");

相關(guān)文章

最新評(píng)論