Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Cookies Vs. Session Variables

KinchKinch Member Posts: 1
Given Security, Speed, and Ease what is better to use on a website Cookies or Session Variables? I don't know much about cookies but Session Variables seems like an obvious choice, but i don't know how to back up the argument? Any info on both of these would be great, especailly if you explain why you choose what you did. Thanks!

Comments

  • jeskejeske Member Posts: 23
    : Given Security, Speed, and Ease what is better to use on a website Cookies or Session Variables? I don't know much about cookies but Session Variables seems like an obvious choice, but i don't know how to back up the argument? Any info on both of these would be great, especailly if you explain why you choose what you did. Thanks!
    :
    It depends on what you are "tracking" and how long you want to track it. I personally like session variables for most situations. Session variables are "randomly" generated by the application/language (ASP, PHP, etc.)and only last as long as the browser is open. That helps prevent inappropriate access by subsequent users of the same machine. If you have personalized settings that you want saved from one session to the next, then obviously, you need cookies, or something similar. By leaving out the expiration info in a cookie, you can accomplish kind of a pseudo-session variable that is only stored in the browser and not on the harddrive and goes away when the browser is closed.
  • Andre YoungAndre Young USAMember Posts: 0

    | http://forcoder.org | free ebooks and video tutorials about \ Visual Basic .NET Swift C MATLAB Go Java PHP Visual Basic Scratch C# PL/SQL Ruby Objective-C C++ Perl Assembly Python Delphi R JavaScript Bash D Erlang Transact-SQL Lua Scheme Kotlin Apex Prolog Clojure ML Awk Ada VBScript Dart LabVIEW Rust COBOL Alice Logo FoxPro Scala F# Crystal Lisp Hack Fortran SAS ABAP Julia \

Sign In or Register to comment.