I am having cookie/cache problems. I am working on this application which was originally set up such that its using lot of forms (10-15) and lot of cookies are saved on user's machine. I do know that at a time only 20 cookies can be saved on user's machine. So what I have seen happening is some of the cookies are overridden once I pass from one page to another. Whats happening is once i fill out the application for the first customer and go back to the application's welcome page to fill out another application, it does not display certain information like user's name or telphone # on the second page. I am clearing the cookies on the first page by using the following function.
Sub Clear_Cookies
'Clears all cookies in session
Dim varNow, strKey
varNow = now()
For each strKey in Response.Cookies
Response.Cookies(strKey) = ""
Response.Cookies(strKey).Expires = varNow
next
End Sub
It does show me on the first page that the cookies are deleted. But on the second page I see some names of the cookies that were passed from the last page of the last application I filled out. However, the values are blank Like LIENPOS = , Type =. The weird part is I don't see SOME of the cookies values I passed through the first page. Anyways, what I dont' understand is if I cleared the cookies how come it shows as deleted on first page and not deleted on second page. I am not sure if the page is cached anywhere but I did find out that after 10 minutes, I am able to see all the values on the second page.
I tried adding varNow - 1 to the clear cookies function. That way i am able to fill out the application but if I hit the back button from the second page and enter the ID on the first page, it does not show me any values on the second page.
Sub Clear_Cookies
'Clears all cookies in session
Dim varNow, strKey
varNow = now()
For each strKey in Response.Cookies
Response.Cookies(strKey) = ""
Response.Cookies(strKey).Expires = varNow
next
End Sub
Please help.
Sub Clear_Cookies
'Clears all cookies in session
Dim varNow, strKey
varNow = now()
For each strKey in Response.Cookies
Response.Cookies(strKey) = ""
Response.Cookies(strKey).Expires = varNow
next
End Sub
It does show me on the first page that the cookies are deleted. But on the second page I see some names of the cookies that were passed from the last page of the last application I filled out. However, the values are blank Like LIENPOS = , Type =. The weird part is I don't see SOME of the cookies values I passed through the first page. Anyways, what I dont' understand is if I cleared the cookies how come it shows as deleted on first page and not deleted on second page. I am not sure if the page is cached anywhere but I did find out that after 10 minutes, I am able to see all the values on the second page.
I tried adding varNow - 1 to the clear cookies function. That way i am able to fill out the application but if I hit the back button from the second page and enter the ID on the first page, it does not show me any values on the second page.
Sub Clear_Cookies
'Clears all cookies in session
Dim varNow, strKey
varNow = now()
For each strKey in Response.Cookies
Response.Cookies(strKey) = ""
Response.Cookies(strKey).Expires = varNow
next
End Sub
Please help.