Example Code:
----------- refresh for HTML example code -----------
<meta http-equiv="refresh" content="60;
url=http://www.ezer.com">
----------- refresh for ASP example code -----------
ASP example 1
<%
Response.AddHeader "Refresh", "5"
%>
ASP example 2
<%
Response.AddHeader "Refresh",
"60;URL=http://www.ezer.com"
%>
------------------------
if use redirect::
Response.Redirect "http://link.ezer.com"
------------------------
Response.AddHeader “REFRESH”, ”60; URL=____"
same as client <META> tags: example
<META HTTP-EQUIV=”REFRESH”, “60;URL=____” >
-------------------------
<%
Response.Status = “302 Object Moved”
Response.Addheader “Location”, “http://____”
%>
same as ASP Response.Redirect method:
<% Response.Redirect “http://____" %>
-------------------------------------
to send status info
<%
Response.Status= “401 Unauthorized”
Response.Addheader “WWW-Authenticate”, “BASIC”
%>
----------------------------------
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://____"
Response.End
%>
--------注意----------
refresh "new URL"
视为浏览过两页的状况
一为原页, 二为new URL
Redirect 是直接转向
所以视同浏览到了该页。
|