JavaScript Assignment #19


This assignment explores working with cookies.

  1. Create a basic page in html that displays text and an image.
  2. Track how many times a user has visited your page by storing this information in a cookie.
  3. Display this information to the user, e.g. You have visited x number of times! The current visit should be included in this number.
  4. Display the date and time of the user's last visit, e.g. "You lasted visted on..."
  5. If this is the user's first visit, display e.g. "You have never visited before" instead.

Note: you will have to upload these files to a web server in order to test them. Cookies cannot be set for local files.