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