文件下載,指定默認名
程序代碼
Response.AddHeader("content-type","application/x-msdownload");
Response.AddHeader("Content-Disposition","attachment;filename=要下載的文件名.rar");
刷新頁(yè)面
程序代碼
Response.AddHeader "REFRESH", "60;URL=newpath/newpage.asp"
等同于客戶(hù)機端<META>元素:
程序代碼
<META HTTP-EQUIV="REFRESH","60;URL=newpath/newpage.asp">
頁(yè)面轉向
程序代碼
Response.Status = "302 Object Moved"
Response.Addheader "Location", "newpath/newpage.asp"
等同于使用Response.Redirect方法:
程序代碼
Response.Redirect "newpath/newpage.asp"
強制瀏覽器顯示一個(gè)用戶(hù)名/口令對話(huà)框
程序代碼
Response.Status= "401 Unauthorized"
Response.Addheader "WWW-Authenticate", "BASIC"
強制瀏覽器顯示一個(gè)用戶(hù)名/口令對話(huà)框,然后使用BASIC驗證把它們發(fā)送回服務(wù)器(將在本書(shū)后續部分看到驗證方法)。
如何讓網(wǎng)頁(yè)不緩沖
程序代碼
Response.Expires = 0
Response.ExpiresAbsolute = Now() - 1
Response.Addheader "pragma","no-cache"
Response.Addheader "cache-control","private"
Response.CacheControl = "no-cache"
本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請
點(diǎn)擊舉報。