Crispy JavaScript Cookies: Introduction - Doc JavaScript | WebReference

Crispy JavaScript Cookies: Introduction - Doc JavaScript


Crispy JavaScript Cookies

HTTP cookies allows a web page to "remember" certain actions executed by the user. A classic example of maintaining a given state is a shopping cart application. The user travels from one product review to the other, and clicks a button to drop an item in his or her "shopping cart." The user-specific data is stored by the browser using cookies.

Cookies are a general mechanism which server-side applications and client-side scripts can use to store textual data on the client side. They are tidbits of information, stored on the user's machine in a browser-dependent textual format.

In this column you'll find out:

  1. How to set a cookie and get one with HTTP headers.
  2. How to set a cookie and get one with JavaScript.
  3. How to use pre-packed functions to save time.
  4. How to put a personal counter on your page.
  5. How to "remember" the user's name.

https://www.internet.com

Created: December 4, 1997
Revised: December 4, 1997
URL: https://www.webreference.com/js/column8/