SlideShare ist ein Scribd-Unternehmen logo
1 von 20
P R E S E N T E D B Y :
D U R L A B H G I R I P U N J E
A M I T K U M A R S I N G
S A M I T K U M A R K A P A T
A S H I F K H A N
Stateless Protocol
HTTP Request & Response Cycle
Cookie, Session
Stateless Protocol
• A protocol which is incapable of remembering the
results and data associated with the transactions it
governs.
• The best - known stateless protocol is the
HYPERTEXT TRANSFER PROTOCOL (HTTP).
Stateful Protocol
• A protocol which is able to remember and store
details of the transactions which it governs.
• A good example of such a protocol is the FILE
TRANSFER PROTOCOL (FTP) which, for example,
remembers the identity of the client that is using it to
DOWNLOAD files.
Stateless Protocol:
Advantage & Disadvantage
 Advantage:
The stateless design simplifies the server design
because there is no need to dynamically allocate
storage to deal with conversations in progress.
 Disadvantage:
A disadvantage is that it may be necessary to include
additional information in every request and this extra
information will need to be interpreted by the server.
Working of Stateless Protocol
The most interesting pieces of information contained in the
request are:
The IP address of you and/or your HTTP proxy
Which document you requested
Which version of which browser you're using
Which page you came from to get here (if you
followed a link)
Your preferred language(s)
COOKIE
What is Cookie?
 It is a piece of text stored by a user's web browser.
 Cookie Types
 By Lifespan
- Session Cookies
- Persistent Cookies
Setting a cookie
Host: www.example.org
browser → server
Content-type: text/html
Set-Cookie: name=value
(content of page)
browser ← server
Host: www.example.org
Cookie: name=value
Accept: */*
browser → server
Set a cookie
setcookie(name [,value [,expire [,path [,domain
[,secure]]]]])
name = cookie name
value = data to store (string)
expire = when the cookie expires. Default is that cookie
expires when browser is closed.
path = Path on the server
domain = Domain at which the cookie is available for.
secure = If cookie should be sent over HTTP connection
only. Default false.
Set-Cookie: name=newvalue; expires=date; path=/; domain=.example.org.
Set-Cookie: RMID=732423sdfs73242; expires=Fri, 31-Dec-2010 23:59:59
GMT; path=/; domain=.example.net
Advantage And Disadvantage of
Cookies
 Advantage
 Acts as your identification card
 It maintain the session between the client and
server
 Page will be displayed quickly
 Disadvantage
 Use as a spyware
 Storage
Some facts of Cookie…
Each cookie on the user’s computer is connected to a
particular domain.
Each cookie be used to store up to 4kB of data.
A maximum of 20 cookies can be stored on a user’s
PC per domain.
Browsers are preprogrammed to allow a total of 300
Cookies, after which automatic deletion based on expiry
date and usage
Session
In computer science, in particular networking, a session is a semi-
permanent interactive information interchange.
It is also known as:-
Dialogue
Conversation or meeting.
A session is between :-
Two or more communicating devices
A computer and user
A session may be implemented as part of protocols and services at the
Application layer
Ex-HTTP Sessions, TELNET remote login sessions
Session layer
A session initiation protocol based internet phone call
Transport layer
A TCP session which is synonyms of TCP connection or established
TCP sockets.
Types of session
Session implemented using software
TCP sessions are typically implemented in software using
multithreading.
A new process or thread is created when the computer establishes or
joins a Session.
The advantage with multiple processes or threads is relaxed
complexity of the software, since each thread is an instance with its
own history and encapsulated variables.
The disadvantage is large overhead in terms of system resources, and
that the session may be interrupted if the system is restarted.
Server side web
sessions
Server-side sessions are handy and efficient, but can become difficult to
handle in conjunction with load-balancing/high-availability systems and
are not usable at all in embedded systems with no storage.
The load-balancing problem can be solved by using shared storage.
A method of using server-side sessions in systems without mass-storage
is to reserve a portion of RAM for storage of session data.
This method is applicable for servers with a limited number of clients
(e.g. router or access point with infrequent or disallowed access to more
than one client at a time).
Client side web sessions
Client-side sessions use cookies and cryptographic techniques to maintain
state without storing as much data on the server.
When presenting a dynamic web page, the server sends the current state data
to the client (web browser) in the form of a cookie.
The client saves the cookie in memory or on disk.
With each successive request, the client sends the cookie back to the server,
and the server uses the data to "remember" the state of the application for that
specific client and generate an appropriate response.
To improve efficiency and allow for more session data, the server may
compress the data before creating the cookie, decompressing it later when the
cookie is returned by the client.
HTTP session
token
A session token is a unique identifier that is generated and sent from
a server to a client to identify the current interaction session.
The client usually stores and sends the token as an HTTP cookie and/or
sends it as a parameter in GET or POST queries.
The reason to use session tokens is that the client only has to handle the
identifier—all session data is stored on the server (usually in a database, to
which the client does not have direct access) linked to that identifier.
Thank You

Weitere ähnliche Inhalte

Was ist angesagt? (20)

Uniform Resource Locator (URL)
Uniform Resource Locator (URL)Uniform Resource Locator (URL)
Uniform Resource Locator (URL)
 
Ajax Ppt 1
Ajax Ppt 1Ajax Ppt 1
Ajax Ppt 1
 
Client Server Architecture ppt
Client Server Architecture pptClient Server Architecture ppt
Client Server Architecture ppt
 
Web browser
Web browserWeb browser
Web browser
 
Basic concept of internet
Basic concept of internetBasic concept of internet
Basic concept of internet
 
PHP Cookies and Sessions
PHP Cookies and SessionsPHP Cookies and Sessions
PHP Cookies and Sessions
 
Clientserver Presentation
Clientserver PresentationClientserver Presentation
Clientserver Presentation
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Distributed & parallel system
Distributed & parallel systemDistributed & parallel system
Distributed & parallel system
 
Cookie & Session In ASP.NET
Cookie & Session In ASP.NETCookie & Session In ASP.NET
Cookie & Session In ASP.NET
 
Database security
Database securityDatabase security
Database security
 
Presentation on web browser
Presentation on web browserPresentation on web browser
Presentation on web browser
 
Web Servers (ppt)
Web Servers (ppt)Web Servers (ppt)
Web Servers (ppt)
 
Web Application
Web ApplicationWeb Application
Web Application
 
Servlets api overview
Servlets api overviewServlets api overview
Servlets api overview
 
Firewall presentation
Firewall presentationFirewall presentation
Firewall presentation
 
Presentation about servers
Presentation about serversPresentation about servers
Presentation about servers
 
Firewall ppt
Firewall pptFirewall ppt
Firewall ppt
 
Buffer overflow attacks
Buffer overflow attacksBuffer overflow attacks
Buffer overflow attacks
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 

Ähnlich wie Cookie

21. Application Development and Administration in DBMS
21. Application Development and Administration in DBMS21. Application Development and Administration in DBMS
21. Application Development and Administration in DBMSkoolkampus
 
Web technology-guide
Web technology-guideWeb technology-guide
Web technology-guideSrihari
 
0_Leksion_Web_Servers (1).pdf
0_Leksion_Web_Servers (1).pdf0_Leksion_Web_Servers (1).pdf
0_Leksion_Web_Servers (1).pdfZani10
 
19_JavaScript - Storage_Cookies-tutorial .pptx
19_JavaScript - Storage_Cookies-tutorial .pptx19_JavaScript - Storage_Cookies-tutorial .pptx
19_JavaScript - Storage_Cookies-tutorial .pptxssuser4a97d3
 
446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)
446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)
446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)nrvalluri
 
introduction to Web system
introduction to Web systemintroduction to Web system
introduction to Web systemhashim102
 
Fundamentals of Web for Non-Developers
Fundamentals of Web for Non-DevelopersFundamentals of Web for Non-Developers
Fundamentals of Web for Non-DevelopersLemi Orhan Ergin
 
session and cookies.ppt
session and cookies.pptsession and cookies.ppt
session and cookies.pptJayaprasanna4
 
Training Webinar: Enterprise application performance with server push technol...
Training Webinar: Enterprise application performance with server push technol...Training Webinar: Enterprise application performance with server push technol...
Training Webinar: Enterprise application performance with server push technol...OutSystems
 
WEB MODULE 5.pdf
WEB MODULE 5.pdfWEB MODULE 5.pdf
WEB MODULE 5.pdfDeepika A B
 
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.pptweb-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt20521742
 
Web hosting presentations by hostindia.net
Web hosting presentations by hostindia.netWeb hosting presentations by hostindia.net
Web hosting presentations by hostindia.netHostin Services Pvt Ltd
 
Computer network (10)
Computer network (10)Computer network (10)
Computer network (10)NYversity
 

Ähnlich wie Cookie (20)

21. Application Development and Administration in DBMS
21. Application Development and Administration in DBMS21. Application Development and Administration in DBMS
21. Application Development and Administration in DBMS
 
WWW & HTTP
WWW & HTTPWWW & HTTP
WWW & HTTP
 
Web technology-guide
Web technology-guideWeb technology-guide
Web technology-guide
 
0_Leksion_Web_Servers (1).pdf
0_Leksion_Web_Servers (1).pdf0_Leksion_Web_Servers (1).pdf
0_Leksion_Web_Servers (1).pdf
 
HTTP Basics
HTTP BasicsHTTP Basics
HTTP Basics
 
19_JavaScript - Storage_Cookies-tutorial .pptx
19_JavaScript - Storage_Cookies-tutorial .pptx19_JavaScript - Storage_Cookies-tutorial .pptx
19_JavaScript - Storage_Cookies-tutorial .pptx
 
446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)
446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)
446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)
 
introduction to Web system
introduction to Web systemintroduction to Web system
introduction to Web system
 
Fundamentals of Web for Non-Developers
Fundamentals of Web for Non-DevelopersFundamentals of Web for Non-Developers
Fundamentals of Web for Non-Developers
 
session and cookies.ppt
session and cookies.pptsession and cookies.ppt
session and cookies.ppt
 
Chapter 3-Processes.ppt
Chapter 3-Processes.pptChapter 3-Processes.ppt
Chapter 3-Processes.ppt
 
Training Webinar: Enterprise application performance with server push technol...
Training Webinar: Enterprise application performance with server push technol...Training Webinar: Enterprise application performance with server push technol...
Training Webinar: Enterprise application performance with server push technol...
 
WEB MODULE 5.pdf
WEB MODULE 5.pdfWEB MODULE 5.pdf
WEB MODULE 5.pdf
 
Session and cookies ,get and post methods
Session and cookies ,get and post methodsSession and cookies ,get and post methods
Session and cookies ,get and post methods
 
WEB Mod5@AzDOCUMENTS.in.pdf
WEB Mod5@AzDOCUMENTS.in.pdfWEB Mod5@AzDOCUMENTS.in.pdf
WEB Mod5@AzDOCUMENTS.in.pdf
 
Cookies & Session
Cookies & SessionCookies & Session
Cookies & Session
 
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.pptweb-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
 
Web hosting presentations by hostindia.net
Web hosting presentations by hostindia.netWeb hosting presentations by hostindia.net
Web hosting presentations by hostindia.net
 
Computer network (10)
Computer network (10)Computer network (10)
Computer network (10)
 
IPCOM000242565D
IPCOM000242565DIPCOM000242565D
IPCOM000242565D
 

Mehr von Samit Kumar Kapat (20)

You are always on my mind
You are always on my mindYou are always on my mind
You are always on my mind
 
Gems
GemsGems
Gems
 
The story of the unemployed
The story of the unemployedThe story of the unemployed
The story of the unemployed
 
Gita in 16 beautiful slides
Gita in 16 beautiful slidesGita in 16 beautiful slides
Gita in 16 beautiful slides
 
Birds' high fashion_show___
Birds' high fashion_show___Birds' high fashion_show___
Birds' high fashion_show___
 
24 truly terrific things.pps
24 truly terrific things.pps24 truly terrific things.pps
24 truly terrific things.pps
 
The story of eagle
The story of eagleThe story of eagle
The story of eagle
 
Honey thewondermedicine
Honey thewondermedicineHoney thewondermedicine
Honey thewondermedicine
 
Heart attack1
Heart attack1Heart attack1
Heart attack1
 
Life always want fight china girl
Life always want fight    china girlLife always want fight    china girl
Life always want fight china girl
 
The art of_being_well.....
The art of_being_well.....The art of_being_well.....
The art of_being_well.....
 
Tantratotem
TantratotemTantratotem
Tantratotem
 
G 2 economic_aspect
G 2 economic_aspectG 2 economic_aspect
G 2 economic_aspect
 
Economic aspects of india 2020
Economic aspects of india 2020Economic aspects of india 2020
Economic aspects of india 2020
 
Futuregroup
FuturegroupFuturegroup
Futuregroup
 
Managing self orientation work shop1
Managing self orientation work shop1Managing self orientation work shop1
Managing self orientation work shop1
 
Voted best email
Voted best emailVoted best email
Voted best email
 
The ant
The antThe ant
The ant
 
Most wanted
Most wantedMost wanted
Most wanted
 
Thoughts to live & love by b
Thoughts to live & love by bThoughts to live & love by b
Thoughts to live & love by b
 

Kürzlich hochgeladen

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxUmeshTimilsina1
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answersdalebeck957
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 

Kürzlich hochgeladen (20)

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 

Cookie

  • 1. P R E S E N T E D B Y : D U R L A B H G I R I P U N J E A M I T K U M A R S I N G S A M I T K U M A R K A P A T A S H I F K H A N Stateless Protocol HTTP Request & Response Cycle Cookie, Session
  • 2. Stateless Protocol • A protocol which is incapable of remembering the results and data associated with the transactions it governs. • The best - known stateless protocol is the HYPERTEXT TRANSFER PROTOCOL (HTTP).
  • 3. Stateful Protocol • A protocol which is able to remember and store details of the transactions which it governs. • A good example of such a protocol is the FILE TRANSFER PROTOCOL (FTP) which, for example, remembers the identity of the client that is using it to DOWNLOAD files.
  • 4. Stateless Protocol: Advantage & Disadvantage  Advantage: The stateless design simplifies the server design because there is no need to dynamically allocate storage to deal with conversations in progress.  Disadvantage: A disadvantage is that it may be necessary to include additional information in every request and this extra information will need to be interpreted by the server.
  • 6.
  • 7. The most interesting pieces of information contained in the request are: The IP address of you and/or your HTTP proxy Which document you requested Which version of which browser you're using Which page you came from to get here (if you followed a link) Your preferred language(s)
  • 8.
  • 9. COOKIE What is Cookie?  It is a piece of text stored by a user's web browser.  Cookie Types  By Lifespan - Session Cookies - Persistent Cookies
  • 10. Setting a cookie Host: www.example.org browser → server Content-type: text/html Set-Cookie: name=value (content of page) browser ← server Host: www.example.org Cookie: name=value Accept: */* browser → server
  • 11. Set a cookie setcookie(name [,value [,expire [,path [,domain [,secure]]]]]) name = cookie name value = data to store (string) expire = when the cookie expires. Default is that cookie expires when browser is closed. path = Path on the server domain = Domain at which the cookie is available for. secure = If cookie should be sent over HTTP connection only. Default false. Set-Cookie: name=newvalue; expires=date; path=/; domain=.example.org. Set-Cookie: RMID=732423sdfs73242; expires=Fri, 31-Dec-2010 23:59:59 GMT; path=/; domain=.example.net
  • 12. Advantage And Disadvantage of Cookies  Advantage  Acts as your identification card  It maintain the session between the client and server  Page will be displayed quickly  Disadvantage  Use as a spyware  Storage
  • 13. Some facts of Cookie… Each cookie on the user’s computer is connected to a particular domain. Each cookie be used to store up to 4kB of data. A maximum of 20 cookies can be stored on a user’s PC per domain. Browsers are preprogrammed to allow a total of 300 Cookies, after which automatic deletion based on expiry date and usage
  • 14. Session In computer science, in particular networking, a session is a semi- permanent interactive information interchange. It is also known as:- Dialogue Conversation or meeting. A session is between :- Two or more communicating devices A computer and user
  • 15. A session may be implemented as part of protocols and services at the Application layer Ex-HTTP Sessions, TELNET remote login sessions Session layer A session initiation protocol based internet phone call Transport layer A TCP session which is synonyms of TCP connection or established TCP sockets.
  • 16. Types of session Session implemented using software TCP sessions are typically implemented in software using multithreading. A new process or thread is created when the computer establishes or joins a Session. The advantage with multiple processes or threads is relaxed complexity of the software, since each thread is an instance with its own history and encapsulated variables. The disadvantage is large overhead in terms of system resources, and that the session may be interrupted if the system is restarted.
  • 17. Server side web sessions Server-side sessions are handy and efficient, but can become difficult to handle in conjunction with load-balancing/high-availability systems and are not usable at all in embedded systems with no storage. The load-balancing problem can be solved by using shared storage. A method of using server-side sessions in systems without mass-storage is to reserve a portion of RAM for storage of session data. This method is applicable for servers with a limited number of clients (e.g. router or access point with infrequent or disallowed access to more than one client at a time).
  • 18. Client side web sessions Client-side sessions use cookies and cryptographic techniques to maintain state without storing as much data on the server. When presenting a dynamic web page, the server sends the current state data to the client (web browser) in the form of a cookie. The client saves the cookie in memory or on disk. With each successive request, the client sends the cookie back to the server, and the server uses the data to "remember" the state of the application for that specific client and generate an appropriate response. To improve efficiency and allow for more session data, the server may compress the data before creating the cookie, decompressing it later when the cookie is returned by the client.
  • 19. HTTP session token A session token is a unique identifier that is generated and sent from a server to a client to identify the current interaction session. The client usually stores and sends the token as an HTTP cookie and/or sends it as a parameter in GET or POST queries. The reason to use session tokens is that the client only has to handle the identifier—all session data is stored on the server (usually in a database, to which the client does not have direct access) linked to that identifier.