设置访问页就可以了吧.. Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "No-Cache" ASP的.
<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
</HEAD> HTML的资源来自于
http://homepage.yesky.com/272/3038272.shtml^^
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "No-Cache" ASP的.
<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
</HEAD> HTML的资源来自于
http://homepage.yesky.com/272/3038272.shtml^^
try{
gblXMLHttp.open("HEAD",window.location,true);
gblXMLHttp.send(null);
}catch(e){
document.write("脱机工作时无法访问!");
window.onload=function(){document.write("脱机工作时无法访问!");}
}
要不就加这个试试看
var gblXMLHttp=getXMLRequester( );
try{
gblXMLHttp.open("HEAD",window.location,true);
gblXMLHttp.send(null);
}catch(e){
document.write("脱机工作时无法访问!");
window.onload=function(){document.write("脱机工作时无法访问!");}
}function getXMLRequester( ){
var xmlhttp_request = false;
try{
if( window.ActiveXObject ){
for( var i = 5; i > -1; i-- ){
try{
if( i == 2 ){
xmlhttp_request = new ActiveXObject( "Microsoft.XMLHTTP" );
}else{
xmlhttp_request = new ActiveXObject( "Msxml2.XMLHTTP." + i + ".0" );
}
break;
}catch(e){
xmlhttp_request = false;
}
}
}else if( window.XMLHttpRequest ){
xmlhttp_request = new XMLHttpRequest();
}
}catch(e){
xmlhttp_request = false;
}
return xmlhttp_request;
}
</script>
你可以测试看看
Stw.xAjax = function(cache){this.cache = ...}
惭愧惭愧,无脸q他了。这是他自己框架的一部分,所以我不能把代码放上来。只能说一下原理,还是需要
xhr.setRequestHeader
来设置。不过仅仅象google或者baidu上能搜到的
xhr.setRequestHeader("No-Cache","1");
或者
xhr.setRequestHeader("If-Modified-Since","-1");
都远远不够。还有好几项是需要的。分散了吧