Forum Moderators: buckworks

Message Too Old, No Replies

Best Method for Variables

Cookies or Session Variables.

         

fashezee

6:53 pm on Jun 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When developing an E-Commerce site for about 30-50 products; which method is more reliable
and secure?

jeremy goodrich

7:02 pm on Jun 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Use both, from what I understand, used in conjunction session variables & cookie'd data in tandom will give you the most complete picture possible.

khuntley

7:51 pm on Jun 17, 2003 (gmt 0)

10+ Year Member



fashezee,
Most definately use both if you can. However if it is a choice between one or the other...

If they are turned on in the browser, cookies are more reliable than sessions. Of course if the customer leaves the site with sessions only, they have to start over upon return. Furthermore, depending on the operating system of the server, sessions can get screwed up easier. Until sessions are more reliable or use something like a "key" from the browser for more permanence, it's important to use cookies also.

Kevin

webdevsf

8:33 pm on Jun 17, 2003 (gmt 0)

10+ Year Member



Using in-memory sessions means that you if ever need to host your application on multiple web servers, you will have to use an affinity based DNS scheme, which is less scalable.

pbreit

6:06 pm on Jun 18, 2003 (gmt 0)

10+ Year Member



Cookies.

Doing both may give you slightly better coverage but will tend to increase complexity and session-mgmt-in-the-URL can impact Google and emailing links.

If you're anti-cookie, you darn well should be anti-giving-your-credit-card-information-to-a-random-unknown-person. So you shouldn't be losing too much actual business, despite the complaints you'll invariably receive.

jaski

6:17 pm on Jun 18, 2003 (gmt 0)

10+ Year Member



It is possible to use it in such a way that it uses cookies if they are supported by the browser .. and if they are not then it appends session variable to the query string. PHP has inbuilt support for this .. not sure about others.