The Web Wizard’s Guide To JavaScriptChapter 7Cookies: Maintaining StateChapter Objectives?To understand the nature and limitations of cookies?To discover how to create and delete cookies?To learn how to set and retrieve your visitors’preferences in cookies?To understand how to customize your Web page using cookies?To learn how to create a simple online shopping cart with cookiesWhat are Cookies??Cookies are small pieces of information stored on the visitor’s hard drive. ?Cookies are mostly harmless, but valid privacy concerns exist about the use of cookies in conjunction with invasive marketing techniques. ?You can create as many as 20 cookies per and Deleting Cookies?Cookies are set when a JavaScript statement in a Web page assigns content to the cookie property of the document object. By default, the content includes information about the domain and directory location of the page that created it. ?When a Web page attempts to retrieve a cookie, the location of the Web page pared to the domain and directory of the page that created the cookie. If the two locations do not match, the cookie cannot be retrieved. ?You can set an expiration date for your cookies. The form of the expiration date is always GMT. ?Bill Dortch’s cookie code is widely used on the and has been
the web wizard’s guide to javascript 来自淘豆网www.taodocs.com转载请标明出处.