1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Sessional Cookies vs Sessional Storage vs Variables

Discussion in 'Programming' started by Web_Dev_Chris, Jun 10, 2019.

  1. #1
    If we can just store information in variables why do we need a sessional cookie or sessional storage?
     
    Web_Dev_Chris, Jun 10, 2019 IP
  2. NetStar

    NetStar Notable Member

    Messages:
    2,471
    Likes Received:
    541
    Best Answers:
    21
    Trophy Points:
    245
    #2
    You most likely would only store a session ID in a cookie. This will be used to look up the session data in the database. The session data will probably have additional information such as creation date, last request date, username, expiration data, and maybe a status (keep alive etc) and any other ID's...
     
    NetStar, Jun 17, 2019 IP
  3. sarahk

    sarahk iTamer Staff

    Messages:
    28,498
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #3
    Because variables are only good for the page that's being generated. If the user clicks through to the next page then you will have lost that information.
     
    sarahk, Jun 17, 2019 IP