Kurt Posted July 8, 2006 Share Posted July 8, 2006 Do you prefer to use cookies or sessions when storing data for things such as login systems? I prefer cookies because they are just easier to use. Some people say they don't like them because if you store sensitive information in them, people can edit it and etc. To get around this, I just store encrypted information in them. So discuss what you think is better and why. Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/ Share on other sites More sharing options...
zq29 Posted July 9, 2006 Share Posted July 9, 2006 They both have their uses, as well as their pros and cons. But I personally prefer to use sessions when I have the choice. Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-55057 Share on other sites More sharing options...
Daniel0 Posted July 9, 2006 Share Posted July 9, 2006 I would have voted both if I could, because it depends on the situation. I use cookies for storing things for long time and sessions for stuff that do not have to be saved when the user has gone away. Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-55195 Share on other sites More sharing options...
ober Posted July 10, 2006 Share Posted July 10, 2006 Both, but I chose sessions. Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-55505 Share on other sites More sharing options...
pixy Posted July 15, 2006 Share Posted July 15, 2006 Sessions, they're more secure. Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-58358 Share on other sites More sharing options...
hvle Posted July 15, 2006 Share Posted July 15, 2006 How can you compare SESSION and cookie. It's like comparing PHP and java script. It's totally different thing. Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-58499 Share on other sites More sharing options...
pixy Posted July 17, 2006 Share Posted July 17, 2006 ^ Not really. You can choose to store information as a session, or as a cookie. Its a preference. Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-59461 Share on other sites More sharing options...
hvle Posted July 18, 2006 Share Posted July 18, 2006 I know, both can store information.But other issue involved. cookie is client's side while session is server side.user had total control of cookie, and no control over session.my point is, as a web developer, who would want to store data in a such a way that user/client can modify it however he wanted. Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-59717 Share on other sites More sharing options...
KefkaIIV Posted July 19, 2006 Share Posted July 19, 2006 Sessions, but I don't see a huge difference. Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-60536 Share on other sites More sharing options...
dark dude Posted July 22, 2006 Share Posted July 22, 2006 Sessions, most users' browsers are set to block cookies anyway Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-62007 Share on other sites More sharing options...
mithu_sree Posted December 13, 2006 Share Posted December 13, 2006 i like both Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-140196 Share on other sites More sharing options...
fert Posted December 13, 2006 Share Posted December 13, 2006 I use sessions Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-140208 Share on other sites More sharing options...
neylitalo Posted December 13, 2006 Share Posted December 13, 2006 [quote author=dark dude link=topic=99899.msg401603#msg401603 date=1153564499]Sessions, most users' browsers are set to block cookies anyway[/quote]I would say quite the opposite. The great majority of websites require cookies, so users are more likely to enable cookies. All the statistics I've seen seem to indicate that users with cookies disabled are few and far between. Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-140232 Share on other sites More sharing options...
.josh Posted December 18, 2006 Share Posted December 18, 2006 I choose both. I try to incorporate using both in my site, but I take the ajax/js approach: Use it for added features/functionality, but script it to gracefully fall back without it.you should have added a "both" option on your poll. Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-143925 Share on other sites More sharing options...
lszanto Posted January 1, 2007 Share Posted January 1, 2007 I prefer to use sessions but am happy to use both. Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-150712 Share on other sites More sharing options...
phrozenflame Posted January 1, 2007 Share Posted January 1, 2007 Sessions Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-150727 Share on other sites More sharing options...
448191 Posted January 1, 2007 Share Posted January 1, 2007 [quote=hvle]How can you compare SESSION and cookie. It's like comparing PHP and java script. It's totally different thing.[/quote]Nobody said anything about $_SESSION or session_* ;)You can't compare sessions and cookies. "Sessions" is a concept, cookies are something concrete. I do prefer using a proper session management system instead of some randomly acessible cookies however. ;) Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-150944 Share on other sites More sharing options...
AXiSS Posted January 2, 2007 Share Posted January 2, 2007 I prefer sessions but to me it seems like what you use depends on what you are using it for. Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-151403 Share on other sites More sharing options...
ted_chou12 Posted February 3, 2007 Share Posted February 3, 2007 I prefer sessions, because I cant get cookies to work properly,btw[quote author=Crayon Violent link=topic=99899.msg487648#msg487648 date=1166475987]you should have added a "both" option on your poll. [/quote]if both option is available, then whats the point of this poll?Ted Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-176020 Share on other sites More sharing options...
neylitalo Posted February 3, 2007 Share Posted February 3, 2007 I think the point CV was trying to make was that they are not mutually exclusive. Cookies work better for some things, sessions for others. Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-176337 Share on other sites More sharing options...
ted_chou12 Posted February 4, 2007 Share Posted February 4, 2007 okay, neylitalo, you got a point there, i like the word you chose as well.Ted Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-176611 Share on other sites More sharing options...
neylitalo Posted February 4, 2007 Share Posted February 4, 2007 [quote author=ted_chou12 link=topic=99899.msg520982#msg520982 date=1170566757]okay, neylitalo, you got a point there, i like the word you chose as well.Ted[/quote]Which word was that? Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-176648 Share on other sites More sharing options...
ted_chou12 Posted February 4, 2007 Share Posted February 4, 2007 mutually exclusive, sounds very mathematical. :DTed Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-176657 Share on other sites More sharing options...
Scriptor Posted February 23, 2007 Share Posted February 23, 2007 Sessions are usefull if you need to just store some data that you're going to use later, coockies would be better if you are going to store something for a while. For the coding I'm currently doing, I use sessions. Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-192558 Share on other sites More sharing options...
.josh Posted February 24, 2007 Share Posted February 24, 2007 okay seriously, I think it has been long established that this isn't really a proper poll, since you wouldn't normally *choose* sessions over cookies. thread closed. Link to comment https://forums.phpfreaks.com/topic/14049-cookies-or-sessions/#findComment-192790 Share on other sites More sharing options...
Recommended Posts