Article From:
    1. cookieThe data is stored on the client’s browser and the session data is placed on the server.
    2. cookieIt is not very safe. Others can analyze the COOKIE stored locally and do COOKIE spoofing, considering that session should be used for security.
    3. sessionThere will be a server on the server for a certain time. When access increases, the performance of your server will be more occupied. COOKIE should be used to reduce server performance.
    4. The data saved by a single cookie can not exceed 4K. Many browsers limit the maximum storage of 20 cookie to one site.
    5. So the personal suggestion:
      Store the important information such as the landing information as SESSION
      If other information needs to be retained, it can be placed in COOKIE.

Leave a Reply

Your email address will not be published. Required fields are marked *