You are here

Cookie Object

SmartBuilder v3 or v4?

Please note that this is the help site for SmartBuilder version 3.

The SmartBuilder version 4 Documentation and Video Tutorials can be found in the Help menu in the tool, or view the v4 Help site.

This object will allow you to save and retrieve cookies on a user's computer, provided that that user's security settings will allow cookies.

You can use this object to store a bookmark, a student name, or even a score, on the user's computer.  There is a template in the Template > - Master Page: Resources folder that deals with bookmarking using cookies, and it is best to take a look at it if you're planning on implementing that functionality.

You must set the name and the value of the cookie as well as how long you want to keep the cookie (in days).

Note: You will most likely leave the Path section blank.  If you are an advanced user, and want to save and retrieve cookies from different lessons, you may wish to choose a path to the shared cookies.  Be aware that cookies can only be retrieved/saved from a directory that is in their path.  For example, if the lesson is located at "" (making your default path for the cookie "/section4/lesson2"), then you cannot choose "/section4/lesson10" as your path.  You must choose "/section4" or just "/" and it will work.

cookie setCookie