CS 142 Lecture Notes: Cookies

Slides:



Advertisements
Similar presentations
Not like the State of Virginia. What is State in ASP.NET? Services (like web services) are Stateless. This means if you make a second request to a server,
Advertisements

UFCE8V-20-3 Information Systems Development 3 (SHAPE HK)
Presenter: James Huang Date: Sept. 29,  HTTP and WWW  Bottle Web Framework  Request Routing  Sending Static Files  Handling HTML  HTTP Errors.
Cookie in a servlet. Cookies are small bits of textual information that a Web server sends to a browser and that the browser returns unchanged when visiting.
CS 142 Lecture Notes: Rails Controllers and ViewsSlide 1 Simple Rails Template
Cookies The HTTP protocol is stateless, that is, it does not maintain information on states after the session ends. But sometimes it is useful to remember.
CC3.12 Lecture 12 Erdal KOSE Based of Prof. Ziegler Lectures.
6/10/2015Cookies1 What are Cookies? 6/10/2015Cookies2 How did they do that?
How the web works: HTTP and CGI explained
Creating your website Using Plain HTML. What is HTML? ► Web pages are authored in HyperText Markup Language (HTML) ► Plain text is marked up with tags,
ASP Cookies Y.-H. Chen International College Ming-Chuan University Fall, 2004.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
Chapter 10 Maintaining State Information Using Cookies.
Lecture 16 Page 1 CS 236 Online Cross-Site Scripting XSS Many sites allow users to upload information –Blogs, photo sharing, Facebook, etc. –Which gets.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
FTP (File Transfer Protocol) & Telnet
WWW Forms and Search. Forms URL - always fetch a particular page What if the information we want varies from time to time and from user to user?
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 7: HTTP and CGI Fundamentals of Web Programming.
OWL Jan How Websites Work. “The Internet” vs. “The Web”?
Lecture 8 – Cookies & Sessions SFDV3011 – Advanced Web Development 1.
Chapter 6: Authentications. Training Course, CS, NCTU 2 Overview  Getting Username and Password  Verifying Username and Password  Keeping The Verification.
Chapter 12 Cookies and Sessions Part 1. Stateless Protocol Hypertext Transfer Protocol (HTTP) is stateless No shopping cards No logging.
COOKIES and SESSIONS. 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.
Sessions in PHP – Page 1 of 13CSCI 2910 – Client/Server-Side Programming CSCI 2910 Client/Server-Side Programming Topic: Sessions in PHP Reading: Williams.
CIS679: Lecture 13 r Review of Last Lecture r More on HTTP.
CS1001 Lecture 9. Overview Security Security HTML HTML.
A Little Bit About Cookies Fort Collins, CO Copyright © XTR Systems, LLC A Little Bit About Cookies Instructor: Joseph DiVerdi, Ph.D., M.B.A.
1-1 HTTP request message GET /somedir/page.html HTTP/1.1 Host: User-agent: Mozilla/4.0 Connection: close Accept-language:fr request.
CP476 Internet Computing CGI1 Cookie –Cookie is a mechanism for a web server recall info of accessing of a client browser –A cookie is an object sent by.
Sessions and Cookies State Management, Cookies, Sessions, Hidden Fields SoftUni Team Technical Trainers Software University
PHP Cookies. Cookies are small files that are stored in the visitor's browser. Cookies can be used to identify return visitors, keep a user logged into.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
ECMM6018 Enterprise Networking for Electronic Commerce Tutorial 7
Maintaining State in ASP. Problem - How do I maintain state information about the user  Several Methods –Cookies –Session variables –Hidden fields 
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 7 Omar Meqdadi Department of Computer Science and Software Engineering University of.
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 3 PHP Advanced.
Hello! I’m Benny the Bunny! Can you help me to find the Easter eggs? Ok… …LET’S GO!!!!!
Ruby on Rails. Web Framework for Ruby Designed to make it easier to develop, deploy, and maintain web applications Design with Model-View-Controller –almost.
Title Category #1 Category #2 Category #3Category #
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
Server side. Internet technologies – Ohad © Server-side processing approaches  Server-side UI generation  PHP/ASP.net/JSP  Single Page Application.
Hello Educational presentation.
JSP Implicit Objects CS 422 Dick Steflik.
Cookies Tutorial Cavisson Systems Inc..
Block 5: An application layer protocol: HTTP
ITM 352 Cookies.
CS 142 Lecture Notes: Network Security
Uniform Resource Locators
CS 142 Lecture Notes: Network Security
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.
البرمجة بلغة الفيجول بيسك ستوديو
AJAX Basics xhr = new XMLHttpRequest();
Asynchronous Javascript And XML
Name Not Precise Enough
HTTP Request Method URL Protocol Version GET /index.html HTTP/1.1
AJAX Basics xhr = new XMLHttpRequest();
Uniform Resource Locators (URLs)
CS 5565 Network Architecture and Protocols
CS 142 Lecture Notes: Rails Controllers and Views
AJAX Basics xhr = new XMLHttpRequest();
CS 142 Lecture Notes: Network Security
CSE 154 Lecture 22: Sessions.
Certificate Revocation
Kevin Harville Source: Webmaster in a Nutshell, O'Rielly Books
Uniform Resource Locators
Compiler Construction
Uniform Resource Locators (URLs)
CGI II: Cookies & Stuff Web Programming.
Article Title: Source: Date:
Presentation transcript:

CS 142 Lecture Notes: Cookies Cookie Protocol Server sets cookies in response header: Set-Cookie: session=0x4137f; Expires=Wed, 09 Jun 2012 10:18:14 GMT Browser returns cookies in headers of later requests: Cookie: session=0x4137fd6a Name Value Expiration Time CS 142 Lecture Notes: Cookies

CS 142 Lecture Notes: Cookies Easter Egg Controller class RailsIntroController < ApplicationController def hello @warning = false if session[:count] == nil then session[:count] = 0 end session[:count] = session[:count] + 1 if (session[:count] >= 3) then @warning = true ... CS 142 Lecture Notes: Cookies

CS 142 Lecture Notes: Cookies Easter Egg View <%@title = "Hello, User"%> <p> This page was fetched at <%= Time.now() %> </p> <% if @warning %> <b>HEY!</b> Don't you have anything better to do than just redisplaying me over and over? <% end %> CS 142 Lecture Notes: Cookies

CS 142 Lecture Notes: Cookies