Four pages are used for this purpose.
Note that they are all 'dotASP' - if a WebPage is 'dotASP'
but has no 'Visual Basic Script' in it, it will be served in exactly the same way as a
SO It is easier to call all the pages 'dotASP' then you will not waste time wondering what extension to use !!
This page creates a Cookie on the Client PC
It then goes straight on to the next page
This page reads the Cookie from the Client PC
If it finds the Cookie, it goes straight on to the next page
If it does not find the Cookie, it serves the Warning Details
This page checks that the Browser on the Client PC is delivering an 'HTTP_COOKIE' to the server.
If it is, it goes straight on to the next page.
If it is not,, it serves the Warning Details
This page declares all is OK and gives a link to the "Data Aquisition" page.
These four files move rapidly to their final conclusion.
It could all have been done much more compactly in just two pages
It makes the explanation easier to understand if it is done in four simple steps.
There is a VBS line that will generate a cookie - and - another to retrieve a cookie.
The first page could have been 'default.asp' or 'index.asp' and the fourth page could have been your "real" Home Page !!
www.byershostingpeter.co.uk/secure/testcookie.asp will demonstrate the four pages working !!
showscript.asp?fn=testcookie.src will show the source for testcookie.asp.
showscript.asp?fn=checkcookie.src will show the source for checkcookie.asp.
showscript.asp?fn=aspsessionid.src will show the source for aspsessionid.asp.
showscript.asp?fn=cookies_ok.src will show the source for cookies_ok.asp.