SlideShare a Scribd company logo
1 of 13
Computer Network
HTTP
Mahd Khan(2104)
WHAT IS A PROTOCOL AND HTTP?
• • Protocol: A Protocol is a standard procedure for defining and
regulating communication. For example TCP, UDP, HTTP etc.
• HTTP is the foundation of data communication for the World Wide
Web.
• The HTTP is the Web’s application-layer protocol for transferring
various forms of data between server and client like plaintext,
hypertext, image, videos and sounds.
OSI Layer Model
Layer Data unit protocols Focus
Application Layer Messages
(HTTP, FTP, SMTP)
Program to Program transfer of
information.
Presentation Layer Text formatting and display
code conversion.
Session Layer Establishing, maintaining and
coordinating communication.
Transport Layer Segments(TCP, UDP) Accurate delivery, service
quality.
Network Layer Packets or
Datagram(IP)
Transport routes, message
handling and transfer.
Data Link Layer Frames(MAC) Coding, addressing and
transmitting information
Physical Layer Signals or Bits Hardware connection
TERMINOLOGY
• IP Address: An Internet Protocol address (IP address) is a numerical label
assigned to each device (e.g., computer, printer) participating in a computer
network that uses the Internet Protocol for communication.
• TCP: Transmission Control Protocol (TCP) is one of the two original core
protocols of the Internet Protocol Suite (IP), and is so common that the entire
suite is often called TCP/IP. TCP provides reliable, ordered, error-checked
delivery of a stream of octets between programs running on computers
connected to an intranet or the public Internet.
• Port Number: A port number is a 16 bit number which when associated with IP
address, completes the destination address for a communications session.
• Socket: A socket is nothing but a combination of IP address and port number. It
is simply an end while communication.
HOW HTTP WORKS?
• HTTP is implemented in two programs: a client program and a
server program, executing on different end systems, talk to each
other by exchanging HTTP messages.
• The HTTP client first initiates a TCP connection with the server.
Once the connection is established, the browser and the server
processes access TCP through their socket interfaces.
PERSISTENT AND NON-PERSISTENT CONNECTIONS
• In non-persistent connection each request/response pair are sent
over a separate TCP connection.
• In persistent connections all of the requests and their
corresponding responses are sent over the same TCP connection.
HTTP REQUEST MESSAGE
• The first line of an HTTP request message is called the request line;
the subsequent lines are called the header lines. The request line
has three fields: the method field, the URL field, and the HTTP
version field. The method field can take on several different values,
including GET, POST, HEAD, PUT, and DELETE etc. The great majority
of HTTP request messages use the GET method. The GET method is
used when the browser requests an object, with the requested
object identified in the URL field.
REQUEST METHOD
• GET: Retrieve Document identified in URL.
• HEAD: Retrieve meta information about document identified in
URL.
• DELETE: Delete specified URL.
• OPTIONS: Request information about available options.
• PUT: Store document under specified URL.
• POST: Give information to server.
• TRACE: Loopback request message.
• CONNECT: For use by Proxies.
HTTP RESPONSE METHOD
• It has three sections: an initial status line, header lines, and
then the entity body. The entity body contains the
requested object itself. The status line has three fields: the
protocol version field, a status code, and a corresponding
status message.
Some common status codes and associated phrases
include:
• 200 OK: Request succeeded and the information is returned in the response.
• 301 Moved Permanently: Requested object has been permanently moved; the
new URL is specified in Location: header of the response message. The client
software will automatically retrieve the new URL.
• 400 Bad Request: This is a generic error code indicating that the request could
not be understood by the server.
• 404 Not Found: The requested document does not exist on this server.
• 505 HTTP Version Not Supported: The requested HTTP protocol version is not
supported by the server.
HTTP: A STATELESS PROTOCOL
• HTTP is a stateless protocol, because an HTTP server
maintains no information about the clients.
• If a particular client asks for the same object twice in a
period of a few seconds, the server does not respond by
saying that it just served the object to the client; instead, the
server resends the object, as it has completely forgotten
what it did earlier.
USER SERVER INTERACTION: COOKIES
• HTTP server being stateless, simplifies server design and has permitted engineers to develop
high-performance Web servers that can handle thousands of simultaneous TCP connections.
However, it is often desirable for a Web site to identify users, either because the server wishes
to restrict user access or because it wants to serve content as a function of the user identity.
For these purposes, HTTP uses cookies. Cookies allow sites to keep track of users.
• The cookie technology has four components:
• A cookie header line in the HTTP response message
• A cookie header line in the HTTP request message
• A cookie file kept on the user’s end system and managed by the user’s browser
• A back-end database at the Web site
1988 BAD REQUEST
HH

More Related Content

Similar to HTTP Protocol: A Guide to the Foundation of Web Communication

Advanced Web Design And Development BIT 3207
Advanced Web Design And Development BIT 3207Advanced Web Design And Development BIT 3207
Advanced Web Design And Development BIT 3207Lori Head
 
An Introduction To World Wide Web
An Introduction To World Wide WebAn Introduction To World Wide Web
An Introduction To World Wide WebAbhishek Kharbanda
 
uniti-websitebasics-230517110223-12e31dbc (1).pptx
uniti-websitebasics-230517110223-12e31dbc (1).pptxuniti-websitebasics-230517110223-12e31dbc (1).pptx
uniti-websitebasics-230517110223-12e31dbc (1).pptxbmit1
 
SCWCD : The web client model : CHAP : 1
SCWCD  : The web client model : CHAP : 1SCWCD  : The web client model : CHAP : 1
SCWCD : The web client model : CHAP : 1Ben Abdallah Helmi
 
web connectivity in IoT
web connectivity in IoTweb connectivity in IoT
web connectivity in IoTFabMinds
 
Web technology-guide
Web technology-guideWeb technology-guide
Web technology-guideSrihari
 
IT2255 Web Essentials - Unit I Website Basics
IT2255 Web Essentials - Unit I  Website BasicsIT2255 Web Essentials - Unit I  Website Basics
IT2255 Web Essentials - Unit I Website Basicspkaviya
 
application of http.pptx
application of http.pptxapplication of http.pptx
application of http.pptxssuseraf60311
 
Web technologies-course 01.pptx
Web technologies-course 01.pptxWeb technologies-course 01.pptx
Web technologies-course 01.pptxStefan Oprea
 
Introduction to the Internet and Web.pptx
Introduction to the Internet and Web.pptxIntroduction to the Internet and Web.pptx
Introduction to the Internet and Web.pptxhishamousl
 

Similar to HTTP Protocol: A Guide to the Foundation of Web Communication (20)

Advanced Web Design And Development BIT 3207
Advanced Web Design And Development BIT 3207Advanced Web Design And Development BIT 3207
Advanced Web Design And Development BIT 3207
 
Web & HTTP
Web & HTTPWeb & HTTP
Web & HTTP
 
Http_Protocol.pptx
Http_Protocol.pptxHttp_Protocol.pptx
Http_Protocol.pptx
 
http presentation 1.pptx
http presentation 1.pptxhttp presentation 1.pptx
http presentation 1.pptx
 
An Introduction To World Wide Web
An Introduction To World Wide WebAn Introduction To World Wide Web
An Introduction To World Wide Web
 
15 Application layer.pptx
15 Application layer.pptx15 Application layer.pptx
15 Application layer.pptx
 
Http
HttpHttp
Http
 
The HTTP and Web
The HTTP and Web The HTTP and Web
The HTTP and Web
 
Http Introduction
Http IntroductionHttp Introduction
Http Introduction
 
uniti-websitebasics-230517110223-12e31dbc (1).pptx
uniti-websitebasics-230517110223-12e31dbc (1).pptxuniti-websitebasics-230517110223-12e31dbc (1).pptx
uniti-websitebasics-230517110223-12e31dbc (1).pptx
 
SCWCD : The web client model : CHAP : 1
SCWCD  : The web client model : CHAP : 1SCWCD  : The web client model : CHAP : 1
SCWCD : The web client model : CHAP : 1
 
web connectivity in IoT
web connectivity in IoTweb connectivity in IoT
web connectivity in IoT
 
Ch-1_.ppt
Ch-1_.pptCh-1_.ppt
Ch-1_.ppt
 
Web technology-guide
Web technology-guideWeb technology-guide
Web technology-guide
 
An Introduction to HTTP
An Introduction to HTTPAn Introduction to HTTP
An Introduction to HTTP
 
SCWCD : The web client model
SCWCD : The web client modelSCWCD : The web client model
SCWCD : The web client model
 
IT2255 Web Essentials - Unit I Website Basics
IT2255 Web Essentials - Unit I  Website BasicsIT2255 Web Essentials - Unit I  Website Basics
IT2255 Web Essentials - Unit I Website Basics
 
application of http.pptx
application of http.pptxapplication of http.pptx
application of http.pptx
 
Web technologies-course 01.pptx
Web technologies-course 01.pptxWeb technologies-course 01.pptx
Web technologies-course 01.pptx
 
Introduction to the Internet and Web.pptx
Introduction to the Internet and Web.pptxIntroduction to the Internet and Web.pptx
Introduction to the Internet and Web.pptx
 

Recently uploaded

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 

Recently uploaded (20)

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 

HTTP Protocol: A Guide to the Foundation of Web Communication

  • 2. WHAT IS A PROTOCOL AND HTTP? • • Protocol: A Protocol is a standard procedure for defining and regulating communication. For example TCP, UDP, HTTP etc. • HTTP is the foundation of data communication for the World Wide Web. • The HTTP is the Web’s application-layer protocol for transferring various forms of data between server and client like plaintext, hypertext, image, videos and sounds.
  • 3. OSI Layer Model Layer Data unit protocols Focus Application Layer Messages (HTTP, FTP, SMTP) Program to Program transfer of information. Presentation Layer Text formatting and display code conversion. Session Layer Establishing, maintaining and coordinating communication. Transport Layer Segments(TCP, UDP) Accurate delivery, service quality. Network Layer Packets or Datagram(IP) Transport routes, message handling and transfer. Data Link Layer Frames(MAC) Coding, addressing and transmitting information Physical Layer Signals or Bits Hardware connection
  • 4. TERMINOLOGY • IP Address: An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication. • TCP: Transmission Control Protocol (TCP) is one of the two original core protocols of the Internet Protocol Suite (IP), and is so common that the entire suite is often called TCP/IP. TCP provides reliable, ordered, error-checked delivery of a stream of octets between programs running on computers connected to an intranet or the public Internet. • Port Number: A port number is a 16 bit number which when associated with IP address, completes the destination address for a communications session. • Socket: A socket is nothing but a combination of IP address and port number. It is simply an end while communication.
  • 5. HOW HTTP WORKS? • HTTP is implemented in two programs: a client program and a server program, executing on different end systems, talk to each other by exchanging HTTP messages. • The HTTP client first initiates a TCP connection with the server. Once the connection is established, the browser and the server processes access TCP through their socket interfaces.
  • 6. PERSISTENT AND NON-PERSISTENT CONNECTIONS • In non-persistent connection each request/response pair are sent over a separate TCP connection. • In persistent connections all of the requests and their corresponding responses are sent over the same TCP connection.
  • 7. HTTP REQUEST MESSAGE • The first line of an HTTP request message is called the request line; the subsequent lines are called the header lines. The request line has three fields: the method field, the URL field, and the HTTP version field. The method field can take on several different values, including GET, POST, HEAD, PUT, and DELETE etc. The great majority of HTTP request messages use the GET method. The GET method is used when the browser requests an object, with the requested object identified in the URL field.
  • 8. REQUEST METHOD • GET: Retrieve Document identified in URL. • HEAD: Retrieve meta information about document identified in URL. • DELETE: Delete specified URL. • OPTIONS: Request information about available options. • PUT: Store document under specified URL. • POST: Give information to server. • TRACE: Loopback request message. • CONNECT: For use by Proxies.
  • 9. HTTP RESPONSE METHOD • It has three sections: an initial status line, header lines, and then the entity body. The entity body contains the requested object itself. The status line has three fields: the protocol version field, a status code, and a corresponding status message.
  • 10. Some common status codes and associated phrases include: • 200 OK: Request succeeded and the information is returned in the response. • 301 Moved Permanently: Requested object has been permanently moved; the new URL is specified in Location: header of the response message. The client software will automatically retrieve the new URL. • 400 Bad Request: This is a generic error code indicating that the request could not be understood by the server. • 404 Not Found: The requested document does not exist on this server. • 505 HTTP Version Not Supported: The requested HTTP protocol version is not supported by the server.
  • 11. HTTP: A STATELESS PROTOCOL • HTTP is a stateless protocol, because an HTTP server maintains no information about the clients. • If a particular client asks for the same object twice in a period of a few seconds, the server does not respond by saying that it just served the object to the client; instead, the server resends the object, as it has completely forgotten what it did earlier.
  • 12. USER SERVER INTERACTION: COOKIES • HTTP server being stateless, simplifies server design and has permitted engineers to develop high-performance Web servers that can handle thousands of simultaneous TCP connections. However, it is often desirable for a Web site to identify users, either because the server wishes to restrict user access or because it wants to serve content as a function of the user identity. For these purposes, HTTP uses cookies. Cookies allow sites to keep track of users. • The cookie technology has four components: • A cookie header line in the HTTP response message • A cookie header line in the HTTP request message • A cookie file kept on the user’s end system and managed by the user’s browser • A back-end database at the Web site