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?
    SEMrush
     
    Web_Dev_Chris, Jun 10, 2019 IP
    SEMrush
  2. NetStar

    NetStar Notable Member

    Messages:
    2,169
    Likes Received:
    443
    Best Answers:
    21
    Trophy Points:
    215
    #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:
    24,964
    Likes Received:
    3,392
    Best Answers:
    99
    Trophy Points:
    615
    #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