JavaScript Page 7 - Using Cookies With JavaScript |
And that's about it for this tutorial. Over the last few pages, I gave you a crash course in reading and writing cookies using JavaScript. I explained what cookies were, dissected the innards of a cookie and showed you what they contain, and then took you through the process of reading and writing a cookie with the document.cookie property, and with the Bill Dortch cookie library. Finally, I wrapped things up with an example of how you could use cookies in a real-world environment, to personalize a Web site for your users by automatically selecting their favourite language for them. Of course, this is just the tip of the iceberg. You can do a lot more with cookies; take a look at the following links for more information: The Netscape cookie specification, at http://www.netscape.com/newsref/std/cookie_spec.html Bill Dortch's cookie library, at JavaScript cookie applications, at More sample cookie applications, at Detecting cookie support in the client, at Sample cookie code and demos, at http://www.cookiecentral.com/ Until next time, be good! Note: Examples are illustrative only, and are not meant for a production environment. Melonfire provides no warranties or support for the source code described in this article.
blog comments powered by Disqus |