Forums

This topic is locked

Cookie or Session Login ???

Posted 29 Aug 2002 13:07:45
1
has voted
29 Aug 2002 13:07:45 Jelle-Jacob de Vries posted:
What's better to use, a cookie login or Session login ?? En what is the difference??

Replies

Replied 29 Aug 2002 13:58:37
29 Aug 2002 13:58:37 Vince Baker replied:
If you use a cookie the user can be remebered the next time they visit the site without having to login.

You can specify how long the cookie will last before expiring.

You can also hold multiple fields within a single cookie that makes life easier.

A Session variable will only last until the user closes the browser window or logs out.

As well as this, the duration of a session variable is controlled on the server so if you have access to your server you can change this. If not, you cant. It is typically set to 20 mins.

I use cookies for everything unless I need security that will log the user out on the browser closing.

Your choice, look at what you need to accomplish against the above.



<% Response.write(The best line of code you can ever use"%>

Vince
VBScript | ASP | HTML | SQL | Oracle | Hosting

Reply to this topic