The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
I have the problem of the forum keeping the cookie alive when closing the window. I am automatically looged in when I start. I do not want this, since people will be logging on via public computers. Can I fix it?
/ Gent
/ Gent<
/ Gent
/ Gent<
Posted
Well, 2 sure ways I can think of is, press the Logout button at the top before leaving the forum. You won't auto login the next time someone visits from the same computer.
Or you can manually delete the cookie from your computer that was created if you didn't logout of the forum.
*----*----*----*----*----*----*----*----*----*----*----*
"However, if you suffer as a Christian, do not be ashamed,
but praise God that you bear that name." 1 Peter 4:16<
Or you can manually delete the cookie from your computer that was created if you didn't logout of the forum.
*----*----*----*----*----*----*----*----*----*----*----*
"However, if you suffer as a Christian, do not be ashamed,
but praise God that you bear that name." 1 Peter 4:16<
Posted
Thanks, but this is not a very secure way. People will forget this from time to time. Is there not a way to limit the cookie's existence to the browser window? Also maybe a time-limit as well?
/ Gent
Edited by - gent on 06 November 2000 00:56:46<
/ Gent
Edited by - gent on 06 November 2000 00:56:46<
Posted
jeeez... can't someone give these guys a good answer?
i am not an ASP developer (im really a Java dude), but I think you can use a global.asa file with a Session_OnStart method and use an ASP session instead of a cookie and then tell IIS to shorten the timeout of the session in your web server properties... errr whatever... this is actually pretty easy to do.
<
i am not an ASP developer (im really a Java dude), but I think you can use a global.asa file with a Session_OnStart method and use an ASP session instead of a cookie and then tell IIS to shorten the timeout of the session in your web server properties... errr whatever... this is actually pretty easy to do.
<
Posted
Hey dude,
Could you please start reading your posts over once more before posting them ? The last few minutes I've been reading nothing but negative posts by you.
Because jeeeez... your answer wasn't that great either, because the easiest way to have a cookie expire when the browser closes is by just not setting the expiration date.
Please understand that all people posting here are trying to help other members. If you like to do that also, and are willing to do that in a polite way: please do so, we are happy with all the help we get
If not, please stay away.
Pierre Gorissen
Even if you're on the right track,
you'll get run over if you just sit there. Will Rogers<
Could you please start reading your posts over once more before posting them ? The last few minutes I've been reading nothing but negative posts by you.
Because jeeeez... your answer wasn't that great either, because the easiest way to have a cookie expire when the browser closes is by just not setting the expiration date.
Please understand that all people posting here are trying to help other members. If you like to do that also, and are willing to do that in a polite way: please do so, we are happy with all the help we get
Pierre Gorissen
Even if you're on the right track,
you'll get run over if you just sit there. Will Rogers<
Posted
Relax, already
======
Doug G
======<
======
Doug G
======<
Posted
Can you please tell me how to do this?
Kind Regards,
/ Gent
Kind Regards,
/ Gent
... because the easiest way to have a cookie expire when the browser closes is by just not setting the expiration date.
/ Gent<
Posted
Ok, I'm not sure it fixes it for the forums all at once, but it should get you an idea of what to look for:
in inc_functions.asp you find this:
Now there are some more places in the code where cookies are set, if you want to find those just do a search for .Expires and you should be able to find them. I'm not sure what happens if there allready is a cookie there with .Expires set to something so you might need to have to delete your cookie(s) first.
If it works, please report back here because it would be nice to add this as a user-selectable option. (like you see at hotmail i.e.)
Pierre Gorissen
Even if you're on the right track,
you'll get run over if you just sit there. Will Rogers<
in inc_functions.asp you find this:
sub DoCookies()
if strSetCookieToForum = 1 then
Response.Cookies(strCookieURL & "User").Path = strCookieURL
else
Response.Cookies(strCookieURL & "User").Path = "/"
end if
Response.Cookies(strCookieURL & "User")("Name") = Request.Form("Name")
Response.Cookies(strCookieURL & "User")("Pword") = Request.Form("Password")
Response.Cookies(strCookieURL & "User")("Cookies") = Request.Form("Cookies")Response.Cookies(strCookieURL & "User").Expires = dateAdd("d", 30, strForumTimeAdjust)Session(strCookieURL & "last_here_date") = ReadLastHereDate(Request.Form("Name"))
if strAuthType = "nt" then
Session(strCookieURL & "last_here_date") = ReadLastHereDate(Session(strCookieURL & "userID"))
end if
end sub
Now there are some more places in the code where cookies are set, if you want to find those just do a search for .Expires and you should be able to find them. I'm not sure what happens if there allready is a cookie there with .Expires set to something so you might need to have to delete your cookie(s) first.
If it works, please report back here because it would be nice to add this as a user-selectable option. (like you see at hotmail i.e.)
Pierre Gorissen
Even if you're on the right track,
you'll get run over if you just sit there. Will Rogers<
Posted
I added ' in front of the .expire line and it works fine on my forums. How do I go about adding this as a feature for the user to select?
<
quote:
Ok, I'm not sure it fixes it for the forums all at once, but it should get you an idea of what to look for:
in inc_functions.asp you find this:sub DoCookies()
if strSetCookieToForum = 1 then
Response.Cookies(strCookieURL & "User").Path = strCookieURL
else
Response.Cookies(strCookieURL & "User").Path = "/"
end if
Response.Cookies(strCookieURL & "User")("Name") = Request.Form("Name")
Response.Cookies(strCookieURL & "User")("Pword") = Request.Form("Password")
Response.Cookies(strCookieURL & "User")("Cookies") = Request.Form("Cookies")Response.Cookies(strCookieURL & "User").Expires = dateAdd("d", 30, strForumTimeAdjust)Session(strCookieURL & "last_here_date") = ReadLastHereDate(Request.Form("Name"))
if strAuthType = "nt" then
Session(strCookieURL & "last_here_date") = ReadLastHereDate(Session(strCookieURL & "userID"))
end if
end sub
Now there are some more places in the code where cookies are set, if you want to find those just do a search for .Expires and you should be able to find them. I'm not sure what happens if there allready is a cookie there with .Expires set to something so you might need to have to delete your cookie(s) first.
If it works, please report back here because it would be nice to add this as a user-selectable option. (like you see at hotmail i.e.)
Pierre Gorissen
Even if you're on the right track,
you'll get run over if you just sit there. Will Rogers
<
Posted
Ehm, haven't thought about it very long yet, I think that the quickest way to do it is to add a checkbox in inc_top.asp so that it displays
Save password
and then use this value to do something like
so that the expires property only gets set if the checkbox is checked.
Pierre Gorissen
Even if you're on the right track,
you'll get run over if you just sit there. Will Rogers<
if checkbox = true then
Response.Cookies(strCookieURL & "User").Expires = dateAdd("d", 30, strForumTimeAdjust)
end if
so that the expires property only gets set if the checkbox is checked.
Pierre Gorissen
Even if you're on the right track,
you'll get run over if you just sit there. Will Rogers<
Posted
Not sure if I did this correctly but I add this to the inc_top.asp and it does not save the cookie.
<input type="checkbox" name="savepassword" value="">
Save Password
<%
if checkbox = true then
Response.Cookies(strCookieURL & "User").Expires = dateAdd("d", 30, strForumTimeAdjust)
end if
%>
Any sugestions?
<
<input type="checkbox" name="savepassword" value="">
Save Password
<%
if checkbox = true then
Response.Cookies(strCookieURL & "User").Expires = dateAdd("d", 30, strForumTimeAdjust)
end if
%>
Any sugestions?
<
Email Member
Message Member
Post Moderation
FileUpload
If you're having problems uploading, try choosing a smaller image.
Preview post
Send Topic
Loading...