Lowyat.NET Forums

Welcome Guest ( Log In | Register )

 
RSS feedBump TopicReply to this topicStart new topicStart Poll

Outline · [ Standard ] · Linear+

> session login and cookie login

lilsean
post Jul 2 2009, 04:26 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #1


Newbie
*

Group: Junior Member
Posts: 11
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jun 2008




HI..
i wan to ask everybody 1 question, can i make cookie login instead of session login. what the diffrent function between both ? thank notworthy.gif notworthy.gif notworthy.gif notworthy.gif notworthy.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
vinothrao84
post Jul 2 2009, 04:35 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #2


Getting Started
**

Group: Junior Member
Posts: 59
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Nov 2006





hi,

actually both of them are almost similar function.
but session can last only certain time frame, but cookie can last few days or until u stated its expired.

well its all depend on application needs whether to choose in between cookie or session. If login, i prefer session unless my application need to hold data.

thx.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
lilsean
post Jul 2 2009, 05:13 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #3


Newbie
*

Group: Junior Member
Posts: 11
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jun 2008




hi..
izzit some browser can turn off cookie , then make our cookie login become unavailable ?
thank vinothrao ......
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
everling
post Jul 3 2009, 02:09 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #4


Enthusiast
*****

Group: Senior Member
Posts: 778
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Feb 2008




The primary difference between using a session and using cookies is where the data is stored.

With cookies, you store the data on the client-side. With sessions, you store the session ID on the client-side via a cookie, which is then used to ID the related client data that is stored on the server-side.

Since the session ID is stored on the client-side via a cookie and once the server is properly configured, it too can have the same life span as cookies - years on end if need be. The only downside is you require server-side capacity to store all those sessions, capacity that was previously provided by your visitor's browsers.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
dkk
post Jul 3 2009, 06:26 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #5


Casual
***

Group: Junior Member
Posts: 471
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003




In actual use, cookies usually only store an ID string so that the webserver can identify the visitor. Webmasters usually want to collect as much info as they can about their visitors. Better to store it on your own database. If it's on cookies spread over millions of visitors on the planet, you can't analyze it much.

BTW: the maximum expiry date for html cookies is 2038. More precisely, 03:14:07 UTC on Tuesday, 19 January 2038. That's the year 2038 problem. It comes from the fact that cookie expiration date is stored as the number of seconds since UNIX epoch, in a 32-bit signed integer, the limit of which is reached then.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
vinothrao84
post Jul 3 2009, 12:25 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #6


Getting Started
**

Group: Junior Member
Posts: 59
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Nov 2006





QUOTE
hi..
izzit some browser can turn off cookie , then make our cookie login become unavailable ?
thank vinothrao ......


yes client browser can turn off their cookies. If it is turn off, then ur application will give error.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Bump TopicReply to this topicTopic OptionsStart new topic
 



----debug section please ignore----
Lo-Fi Version Time is now: 25th November 2009 - 12:14 PM
All Rights Reserved 2003-2009 Vijandren Ramadass (~living on a prayer~)