用Asp如何实现防止网页频繁刷新?_ASP基础

<%
    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()
    %><!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN“>
    <html>
    <head>
    <title>Asp如何防止网页频繁刷新-wwww.zhangpeng.com.cn</title>
    <meta http-equiv=“Content-Type“ content=“text/html; charset=gb2312“>
    <link rel=“stylesheet“ type=“text/css“ href=“style.css“>
    <style type=“text/css“>
    </style>
    </head>
    <body style=“background-color:#666666;font-size:36pt;font-family:黑体;color:#FFFFFF;“>
    Asp如何防止网页频繁刷新-www.zhangpeng.com.cn
    </body>
    </html>

时间: 2024-09-20 05:49:14

用Asp如何实现防止网页频繁刷新?_ASP基础的相关文章

用Asp如何实现防止网页频繁刷新?

<%     dim RefreshIntervalTime     RefreshIntervalTime = 3 '防止刷新的时间秒数,0表示不防止     If Not IsEmpty(Session("visit")) and isnumeric(Session("visit")) and int(RefreshIntervalTime) > 0 Then      if (timer()-int(Session("visit"

Asp防止网页频繁刷新的源码

刷新|网页 <%dim RefreshIntervalTimeRefreshIntervalTime = 3 '防止刷新的时间秒数,0表示不防止If Not IsEmpty(Session("visit")) and isnumeric(Session("visit")) and int(RefreshIntervalTime) > 0 Then if (timer()-int(Session("visit")))*1000 <

ASP防止网页频繁刷新的方法介绍

刷新|网页 <%dim RefreshIntervalTimeRefreshIntervalTime = 3 '防止刷新的时间秒数,0表示不防止If Not IsEmpty(Session("visit")) and isnumeric(Session("visit")) and int(RefreshIntervalTime) > 0 Then if (timer()-int(Session("visit")))*1000 <

ASP实例:Asp 防止网页频繁刷新一法

刷新|网页 下面示例代码是防止用网页刷新过快,如果多个页面使用,最好将<%...%>代码存为一个asp文件,在需要的页面最前面include file使用.<%dim RefreshIntervalTimeRefreshIntervalTime = 3 '防止刷新的时间秒数,0表示不防止If Not IsEmpty(Session("visit")) and isnumeric(Session("visit")) and int(RefreshIn

php防止CC攻击代码 php防止网页频繁刷新_php技巧

网页快速恶意刷新,cc攻击就是攻击者利用代理服务器生成指向目标站点的合法请求,模拟多用户不停的对受害网站进行访问,特别是访问那些需要大量数据操作需要大量CUP时间的页面,最终导致目标网站服务器资源耗尽,一直到宕机崩溃,如此一来,造成服务器资源的浪费,CPU长时间处于100%,永远都有处理不完的连接直至就网络拥塞,正常的访问被中止.我们称之为CC攻击.尽管我们可以借助于一些防攻击的软件来实现,不过效果有时并不明显. 下面我提供一段PHP的代码,可以起到一定的防CC攻击效果.主要功能:在3秒内连续刷

ASP的Error对象知识简析_ASP基础

在VBScript中,有一个On Error Resume Next语句,它使脚本解释器忽略运行期错误并继续脚本代码的执行.接着该脚本可以检查Err.Number属性的值,判别是否出现了错误.如果出现错误,返回一个非零值.在ASP3.0中,也可以使用OnErrorGoto0"转回到"缺省的错误处理.在ASP2.0中实际也进行这种处理,但是没有相应文档说明,这在很多asp数据相关处理文件中司空见惯,加上On Error Resume Next,关闭缺省的错误处理,然后用err抓住, If

asp 内置对象 Application 详解_ASP基础

asp内置对象 Application 详解  在 ASP 的内建对象中除了用于发送.接收和处理数据的对象外,还有一些非常实用的代表 Active Server 应用程序和单个用户信息的对象.  让我们先来看看 Application 对象.在同一虚拟目录及其子目录下的所有 .asp 文件构成了 ASP 应用程序.我们非但可以使用 Application 对象,在给定的应用程序的所有用户之间共享信息,并在服务器运行期间持久的保存数据.而且,Application 对象还有控制访问应用层数据的方法

超精华的asp代码大全第1/2页_ASP基础

显示页面加载时间 重复域中的斑马线  显示字符串前20个字符并在结尾处添加"--"  如果动态图片为空,使用默认图片代替  如果数据为空,使用默认提示信息代替  ●显示页面加载时间  页面顶部添加下面的代码: <% Dim strStartTime Dim strEndTime strStartTime = Timer '开始时间 %> 页面(同一页)的末尾添加: <% ' 加载完毕的时间 strEndTime = Timer Response.Write (&quo

javascript asp教程第十一课--Application 对象_ASP基础

Overview: The Application Object represents a collection of ASP pages. The Application object has zero (0) properties, two (2) collections, two (2) methods, and two (2) events. Get Started: Below are a couple scripts for lesson11. <%@LANGUAGE="Jav