i now the differece between seesion and cookies. but i am not sure when one to use. when people make website like dreamincode, myspace, linkedin, etc.. wht they use.

right now on my site when user log in session get started but if user hit remember me than cookie get start. this is a good idea or bad idea? let me know


5 Years
Discussion Span
Last Post by diafol

So essentially, a cookie is stored on the person's machine, whereas a SESSION is stored onto the server.

Ok, it depends on the situation in which you are using and both of them will work in most situations, so for me, it's down to the fact I prefer SESSIONS over COOKIES.

I'll answer this question (in my opinion):

but if user hit remember me than cookie get start. this is a good idea or bad idea?

It's a good idea and a bad idea. If you're storing really secure information about the user and the user signs into a machine that many people use then offering this service would be a disadvantage (from the user's prospective).

Sorry if this isn't much help.


Remember that you need to allow cookies to enable sessions to work. Needs to store the UID.

Sessions will be easier than cookies. Also, you don't need to save various bits of data to the client - all on the server. The session timeout is taken care of for you - or you can set it. The cookies need an expiry time, which can be a pain. Cookies have become a bit of an issue within the EU of late.

Cookies for 'remember me' - can't see any other way of doing that.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.