JavaScript
  Home arrow JavaScript arrow Page 7 - Using Cookies With JavaScript
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Using Cookies With JavaScript
By: Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 132
    2004-04-26

    Table of Contents:
  • Using Cookies With JavaScript
  • Caveat Emptor
  • What's In A Name?
  • Cookie-Cutter Code
  • Running The Numbers
  • Speaking Native
  • Dinner Time

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    TestComplete™ automates software testing for a fraction of what the big guys charge. Easy functional and load testing for all Windows, .NET, Java and Web apps. Download a free trial now.

    Using Cookies With JavaScript - Dinner Time
    (Page 7 of 7 )

    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
    http://www.webwoman.biz/articles/Cookies/cookie.txt

    JavaScript cookie applications, at
    http://javascript.internet.com/cookies/

    More sample cookie applications, at
    http://members.ozemail.com.au/~dcrombie/cookie.html and
    http://developer.netscape.com/viewsource/archive/goodman_cookies.html

    Detecting cookie support in the client, at
    http://www.javascriptkit.com/javatutors/cookiedetect.shtml

    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.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

       

    JAVASCRIPT ARTICLES

    - Getting Attention with Interactive Effects
    - Interacting with Tooltips and Previews
    - Just-in-Time Information and Ajax
    - Interactive Effects
    - Using Cookies With JavaScript
    - Understanding the JavaScript RegExp Object
    - Controlling Browser Properties with JavaScri...
    - Using Timers in JavaScript
    - Form Validation with JavaScript
    - JavaScript Exception Handling
    - Stringing Things Along
    - Understanding The JavaScript Event Model (pa...
    - Understanding The JavaScript Event Model (pa...
    - An Object Lesson In JavaScript




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway