Force Refresh Page
<%
' mandatory refreshing random authentication code
' allows random authentication code to press IE's Back button each time, returns the login page the immediately code automatically refreshes,
response.expires=-1
Response.AddHeader " Pragma "," No-cache "
Response.AddHeader" Cache-control "," No-store "
%>
Determine if the file address is valid
<% Response.Write ("") on Error Resume Next Dim thisurl,thistext thisurl=request ("Thisurl") ' Define file address (non-HTML format document)!
If Thisurl= "" Then Response.Write ("Please enter file address first!")
Response.End End If Function objxmlhttp (xmlurl) on Error Resume Next Set objxml = CreateObject ("Microsoft.XMLHTTP") Objxml. Open "Get", Xmlurl,false Objxml.setrequestheader "Content-type", "application/x-www-form-urlencoded" Objxml.send OBJX Mlhttp = Objxml.responsebody If Err then Err.Clear Response.Write ("Failed to establish connection, file does not exist or network problem!; Error reason: "&Err.Description&"! ") Response.End end-function function Bytes2bstr (VIN) Strreturn =" For i = 1 to LenB (VIN) Thischarc
Ode = AscB (MidB (vin,i,1)) If Thischarcode < &h80 Then Strreturn = strreturn & Chr (Thischarcode) Else Nextcharcode = AscB (MidB (vin,i+1,1)) Strreturn = Strreturn & Chr (CLng (thischarcode) * &h100 + CInt (nextcha Rcode)) i = i + 1 end If Next bytes2bstr = Strreturn End Function Thisurl2=split (Thisurl, ",") for each II in Thisurl2 THISTEXT=BYTES2BSTR (objXmlHttp (ii)) if INSTR (Thistext, "") <>0 Then Response.Write ("" & II & "X") Else Response.Write ("" & II & "√") End If Next if Err then err . Clear Response.Write ("met the accident!; Error reason: "&Err.Description&"! ") Response.End End If%>
The above is an ASP forced to refresh the Web page and judge the file address instance code, I hope to help you learn.