Monitor

Lesson 19: Cookies

 Signed in as:    
      Sign out

 

Links

Your home page

Creating Websites home

Beginnings
   Introduction to the Web
   Introducing HTML
   Marking up text
   Setting Up
   FTP and FileZilla
   Links and anchors
   Getting some style

Intermediate topics
   Style sheets
   Testing and debugging
   Lists
   Images and maps
   Audio and video
   Intro to JavaScript
   The DOM and scripting
   Logic and Arrays
   Functions and document.write
   Forms and INPUT
   Other controls
   Cookies
   HTML tables
   Structuring tables
   Scripting w/ tables
   Inline frames
   Loose ends

   Support

Here we discuss the role of cookies, and how these text strings are used to communicate across pages. Topics include:

 

Note: I strongly suggest you view all our videos in full screen mode: click the icon in the lower right corner of the video area (it shows four arrows pointing to the corners of the screen). When you are done, the Esc ("escape") key returns you to regular mode.

 


Lesson 19: Cookies

Click here for the video transcript

 

Supplemental materials

    How to test if cookies are disabled, and how you might address the issue
    A cumulative summary of the contents of the course so far

 

Hands on exercise

This exercise is primarily focused on setting cookies and retrieving cookie values across pages.

For this exercise, we're going to update Events.html from lesson 16, creating a new page, Events2.html. The Events.html page includes a pop-up window to display who's planning to attend an event (the class reunion for Flying Drones Academy class of 2018). There is also a link to sign up to attend, which, you may recall, ended up setting up an email.

This time, we're going to change that link to point to another new page, newAttendee.html, that includes an <input> element for you to specify the name of a new attendee. You'll put that name into a cookie and then provide a link back to Events2.html, which will get the cookie value and add it to the list of attendees so it will appear in the pop-up window of attendees.

So here are the steps for the first page ...

 

And here are the steps for the second page ...

 

Testing (either locally from your MyWebFiles, or upload the two files and test from your server) ...

 

Exercise stretch - deal with cookies not enabled situation (optional) ...

 

Notes:

 

 

 Lesson navigation 

 

 

Email us if you would like additional information. We would love to see your comments and recommendations for our site.