A cookie can be used to identify a user. It is a small file that the server embeds on the user's computer. Each time the same computer asks for a page through a browser, it will send the cookie too.
With ASP, you can both create cookies and retrieve the value of cookies.
<%
response.cookies("NumVisits").Expires = date + 365
num=request.cookies("NumVisits")
If num = "" Then
response.cookies("NumVisits") = 1
Else
response.cookies("NumVisits") = num + 1
End If
%>
<html><body>
<%
if num="" then
%>
Welcome! This is the first time you are visiting this Web page.
<%
else
%>
You have visited this Web page <% response.write(num) %>
times before
<%
end if
%>
</body></html>
You can delete the cookie set by this page and it will start back over as if you had never visited this page. To delete cookies see http://support.microsoft.com/default.aspx?scid=kb;EN-US;q278835.
On IE5 just follow these steps: