1. Computing & Technology

Cookie Toolbox

1. The Script

clr gif
Join the Discussion

Questions? Comments?

More of this Feature

Cookie Functions Using the Tools

Related Resource

Your Favourite Links

This cookie toolbox javascript contains all of the cookie functions that you are likely to need in one place. With this toolbox on your site you will never need to code Javascript to access cookies ever again you just call the appropriate function from the toolbox.

The first step in using this script is to select the code from the text box below (there is a highlight all button beneath it to make this easier) and copy it into a file called cookie.js.

You next attach the script into your web page that is to use cookies by adding the following code into the head section of your page.

<script type="text/javascript" src="cookie.js">
</script>

All that remains then is to call the functions from within the toolbox whenever you need to process cookies.

Note that the script and the descriptions of the functions that it contains are copied from the "Ask Felgall" website with the permission of the copyright owner.

©2012 About.com. All rights reserved.

A part of The New York Times Company.