The Web Wizard’s Guide To JavaScript Chapter 7 Cookies: Maintaining State.

Slides:



Advertisements
Similar presentations
Copyright © 2003 Pearson Education, Inc. Slide 7-1 The Web Wizards Guide to PHP by David Lash.
Advertisements

The Web Wizards Guide To JavaScript Chapter 3 Working with Forms.
The Web Wizards Guide To JavaScript Chapter 1 JavaScript Basics.
Cookies, Sessions. Server Side Includes You can insert the content of one file into another file before the server executes it, with the require() function.
Session 13 Active Server Pages (ASP) Matakuliah: M0114/Web Based Programming Tahun: 2005 Versi: 5.
6/10/2015Cookies1 What are Cookies? 6/10/2015Cookies2 How did they do that?
Web-based Application Development Lecture 20 April 4, 2006 Anita Raja.
B118 Web Programming Session #9 Client/Server & Cookies April 5, 2004.
What are cookies? Cookies are text files stored on one’s computer after visiting a website Used for: -Storing information such as a unique visitor ID -Allowing.
XP Tutorial 9 New Perspectives on JavaScript, Comprehensive1 Working with Cookies Managing Data in a Web Site Using JavaScript Cookies.
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
Chapter 9 Introduction to the Document Object Model (DOM) JavaScript, Third Edition.
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
Chapter 10 Maintaining State Information Using Cookies.
The Web Wizard’s Guide to Freeware/Shareware Chapter Five Scripts and Applets.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 48 How Internet Sites Can Invade Your Privacy.
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 12.
The Web Wizard’s Guide To JavaScript Chapter 1 JavaScript Basics.
Adapted from Computer Concepts, New Perspectives, Thompson Course Technology EDW 647: The Internet Dr. Roger Webster & Dr. Nazli Mollah 24 Cookies: What.
Cookies and Security Saving the “state”
ASP.NET 2.0 Chapter 5 Advanced Web Controls. ASP.NET 2.0, Third Edition2 Objectives.
JavaScript, Fourth Edition
Working with Cookies Managing Data in a Web Site Using JavaScript Cookies* *Check and comply with the current legislation regarding handling cookies.
The Web Wizard’s Guide To JavaScript Chapter 6 Working with Dates and Times.
Chapter 8 Cookies And Security JavaScript, Third Edition.
Week seven CIT 354 Internet II. 2 Objectives Database_Driven User Authentication Using Cookies Session Basics Summary Homework and Project 2.
COOKIES. INTERNET COOKIES What are they Where are they found What should you do about them.
PHP1-1 PHP Lecture 2 Xingquan (Hill) Zhu
Lecture 8 – Cookies & Sessions SFDV3011 – Advanced Web Development 1.
Regular Expression (continue) and Cookies. Quick Review What letter values would be included for the following variable, which will be used for validation.
12 Developing a Web Site Section 12.1 Discuss the functions of a Web site Compare and contrast style sheets Apply cascading style sheets (CSS) to a Web.
Cookies Web Browser and Server use HTTP protocol to communicate and HTTP is a stateless protocol. But for a commercial website it is required to maintain.
Section 12.1 Discuss the functions of a Web site Create a feedback form Compare and contrast option buttons and check boxes Section 12.2 Explain the use.
11 1 Cookies CGI/Perl Programming By Diane Zak Objectives In this chapter, you will: Learn the difference between temporary and persistent cookies.
Introduction to Client-Side Web Development Introduction to Client-Side programming using JavaScript JavaScript; application examples 10 th February 2005.
Describe the use of technology in the marketing-information management function.
U.S. Department of Commerce Web Advisory Group Minding Your Own Business The Platform for Privacy Preferences Project.
ITGS Databases.
JavaScript Part 9 George Mason University June 23, 2010.
Copyright © 2003 Pearson Education, Inc. Slide 7-1 The Web Wizard’s Guide to PHP by David Lash.
The Web Wizard’s Guide To JavaScript Chapter 8 Working with Windows and Frames.
ECMM6018 Enterprise Networking for Electronic Commerce Tutorial 7
Copyright ©2005  Department of Computer & Information Science Working with Cookies.
Cookies (continue). Extracting Data From Cookies Data retrieved from a cookie is a simple text string. While there is no specific JavaScript function.
Cookies. Cookie A cookie is a method for a Web server to maintain state information about users as users navigate different pages on the site, and as.
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 13.
IS2802 Introduction to Multimedia Applications for Business Lecture 8: JavaScript and Cookies Rob Gleasure
ITM © Port,Kazman 1 ITM 352 Cookies. ITM © Port,Kazman 2 Problem… r How do you identify a particular user when they visit your site (or any.
Unit-6 Handling Sessions and Cookies. Concept of Session Session values are store in server side not in user’s machine. A session is available as long.
Copyright © 2003 Pearson Education, Inc. Slide 7-1 The Web Wizard’s Guide to PHP by David Lash.
1 Chapter 22 World Wide Web (HTTP) Chapter 22 World Wide Web (HTTP) Mi-Jung Choi Dept. of Computer Science and Engineering
COOKIES Gloria Soria Network Security COSC 356. What is a Cookie? A cookie is a piece of text that a Web Server can store on a user's hard disk. Cookies.
The Web Wizard’s Guide To JavaScript Chapter 4 Image Swapping.
Amazon Web Services (aws)
Section 12.1 Section 12.2 Discuss the functions of a Web site
19.10 Using Cookies A cookie is a piece of information that’s stored by a server in a text file on a client’s computer to maintain information about.
COOKIES.
Client / Session Identification Cookies
The Web Wizard’s Guide To JavaScript
What is Cookie? Cookie is small information stored in text file on user’s hard drive by web server. This information is later used by web browser to retrieve.
Client / Session Identification Cookies
Section 14.1 Section 14.2 Identify the technical needs of a Web server
The Web Wizard’s Guide To JavaScript
The Web Wizard’s Guide To JavaScript
CSc 337 Lecture 27: Cookies.
The Web Wizard’s Guide To JavaScript
The Web Wizard’s Guide To JavaScript
Cookies A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer.
CSc 337 Lecture 25: Cookies.
Presentation transcript:

The Web Wizard’s Guide To JavaScript Chapter 7 Cookies: Maintaining State

Chapter 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 cookies

What 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 domain.

Creating 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 is compared 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 Internet and has been placed in the public domain.

Storing Preferences One popular use of cookies is to store visitor preferences, such as background color and login information. When a Web page retrieves information from a cookie, the page can act on that information by changing the page appearance to suit the expressed preferences of the visitor.

Shopping with Cookies Another popular use of cookies is to retain selected items as visitors move through the pages of an online shopping cart. The shopping cart technique can also be adapted to delivering surveys or tests online.