How do i determine if a user is refreshing the page.
I want to know this cause everytime a user view the page a counter is increased but i only want to increase the counter if it from click a link and not just refreshing the page
I use this counter in a global.asa. The user gets one count until they close there browser and go back into it. If you do it this way it may help out.
<SCRIPT LANGUAGE="Vbscript" RUNAT="Server">
Sub Application_OnStart
Application("countUsers"=0
Application("start"=Now()
Application("total"=0
Application("date"=Date()
End Sub
Sub Application_OnEnd
End Sub
Sub Session_OnStart
Session("count"
Application.Lock
Session("count"=CInt(Application("countUsers")
Session("count"=Session("count" + 1
Application("countUsers"=Session("count"
Application.UnLock
Session("start"=Now()
End Sub
Sub Session_OnEnd
session.Abandon
End Sub
</SCRIPT>
in the index.asp
You are visitor number <%= Application("countUsers" %> provide tools to let people become their best.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.