如何防止页面被恶意刷新?
如何防止页面被恶意刷新?
<%
dim RefreshIntervalTime
RefreshIntervalTime = 3 '防止刷新的时间秒数,0表示不防止
If Not IsEmpty(Session("visit")) and isnumeric(Session("visit")) and int(RefreshIntervalTime) > 0 Then
if (timer()-int(Session("visit")))*1000 < RefreshIntervalTime * 1000 then
Response.write ("<meta http-equiv=""refresh"" content="""& RefreshIntervalTime &""" />")
Response.write ("刷新过快,请稍候")
Session("visit") = timer()
Response.end
end if
End If
Session("visit") = timer()
%>