Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Describe the difference between cookies, sessionStorage, and localStorage.
#1
Describe the difference between cookies, sessionStorage, and localStorage.
Reply
#2
A cookie is a tiny piece of data sent from a website that the user's browser stores on the computer, while he or she is navigating the site.

A session cookie exists only in temporary memory, while the user navigates the website. Browsers as a rule delete session cookies when the user closes the browser.
Some web browsers store the information locally from the webpage to for future use.
Reply
#3
Cookies are saved at browser while sessions are saved at server.
Reply
#4
In terms of capabilities, cookies only allow you to store strings. sessionStorage and localStorage allow you to store JavaScript primitives but not Objects or Arrays. Session storage will generally allow you to store any primitives or objects supported by your Server Side language/framework.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Describe what event bubbling is? Kajal 1 8,817 07-15-2020, 12:03 PM
Last Post: RH-Calvin
  What is the difference between mysql_fetch_object() and mysql_fetch_array()? Kajal 1 3,504 07-15-2020, 11:55 AM
Last Post: RH-Calvin
  Difference between div and span? beingchinmay 3 4,529 07-15-2020, 11:54 AM
Last Post: RH-Calvin
  Difference between swing and AWT? beingchinmay 0 2,978 04-13-2016, 02:39 PM
Last Post: beingchinmay
  What is the difference between $message and $$message? beingchinmay 0 2,801 04-11-2016, 05:19 PM
Last Post: beingchinmay
  What are cookies and how will you use them? beingchinmay 0 2,619 01-28-2016, 02:19 PM
Last Post: beingchinmay

Forum Jump:


Users browsing this thread: 3 Guest(s)