zoukankan      html  css  js  c++  java
  • Response.AddHeader使用实例收集

    文件下载,指定默认名srxljl
    Response.AddHeader("content-type","application/x-msdownload");
    Response.AddHeader("Content-Disposition","attachment;filename=要下载的文件名.rar");

    刷新页面srxljl
    Response.AddHeader “REFRESH”, ”60;URL=newpath/newpage.asp”
    这等同于客户机端<META>元素:
    <META HTTP-EQUIV=”REFRESH”, “60;URL=newpath/newpage.asp”

    页面转向srxljl
    Response.Status = “302 Object Moved”
    Response.Addheader “Location”, “newpath/newpage.asp” (可以跨域跳转)
    这等同于使用Response.Redirect(不能跨域跳转)方法:
    Response.Redirect “newpath/newpage.asp”

    强制浏览器显示一个用户名/口令对话框srxljl
    Response.Status= “401 Unauthorized”
    Response.Addheader “WWW-Authenticate”, “BASIC”
    强制浏览器显示一个用户名/口令对话框,然后使用BASIC验证把它们发送回服务器(将在本书后续部分看到验证方法)。

    如何让网页不缓冲srxljl
    Response.Expires = 0
    Response.ExpiresAbsolute = Now() - 1
    Response.Addheader "pragma","no-cache"
    Response.Addheader "cache-control","private"
    Response.CacheControl = "no-cache

  • 相关阅读:
    图像处理笔记(五)
    图像处理笔记(四)
    图像处理(三)
    图像处理(二)
    图像处理(一)
    Halcon安装注意事项
    Tensorflow从开始到放弃(技术篇)
    Tensorflow从开始到放弃
    python 2.x中的中文
    WPF使用border画框
  • 原文地址:https://www.cnblogs.com/ChengDong/p/2456633.html
Copyright © 2011-2022 走看看