Professional Documents
Culture Documents
Internet Programming 1
Chapter 1:
HTTP- the Hyper-Text Transfer Protocol
Mohamed Mahdi
+ 2
Content
1. Introduction
6. Web browser
7. HTTP Authentications
+ 3
Introduction
HTTP was developed by Sir Tim Berners-Lee in the early 1990s while working at CERN, the
European Organization for Nuclear Research.
It was created to facilitate the sharing of documents among scientists.
HTTP, or the Hyper-Text Transfer Protocol is a protocol that enables the transfer of hypertext
and other data on the internet.
It is the backbone of web communication, allowing web browsers to request and display web
pages, images, videos, and other resources.
+ 4
Introduction
Hypertext: HTTP is specifically designed for transferring hypertext, which includes text, links,
and media like images, audio, and videos. These elements collectively make up web pages,
which are the building blocks of the World Wide Web.
+ 5
The web is based on the concept of hypertext, which allows users to navigate between
different pieces of content by clicking on links.
The web is accessed through web browsers, which interpret the HTML and CSS code used to
create web pages and display them to users.
The web is constantly evolving, with new technologies and standards being developed to
improve its functionality and security.
+ 7
The World Wide Web (or web, for short) is a global digital library of information available
to anyone connected to the Internet
The web consists of a worldwide collection of electronic documents, each of which is called a
webpage
A website is a collection of related webpages
DNS
+ 9
A URL (Uniform Resource Locator) is a link or web address used to identify and locate
specific webpage, file, or resource on the internet.
They allow users to navigate the web and retrieve specific content from servers.
Domain Name: identifies the specific website or server where the resource is hosted. It typically consists of a
combination of a second-level domain (e.g., example) and a top-level domain (e.g., com). In our example URL
Path: specifies the specific location of the resource within the server's file structure. It can include directories and
subdirectories.
Query Parameters (Optional): provide additional information to the server about the request. They are appended to
the URL after a question mark (?) and separated by ampersands (&). Each query parameter consists of a key-value pair.
A URN (Uniform Resource Name) is a persistent identifier for a resource, designed to remain
globally unique even if the resource's location changes.
URNs are designed to remain globally unique and can be used to identify various types of
resources, including documents, books, images, and more.
Example
+ 15
HTTP Request: A client initiates an HTTP request to a server to retrieve a specific resource. The
request consists of several components:
Request Line: Specifies the HTTP method (e.g., GET, POST, PUT, DELETE), the target resource's path,
and the HTTP version.
Headers: Provide additional information about the request, such as the user agent, content type, and
cookies.
Body (optional): Contains additional data sent along with the request, typically used in POST or PUT
requests.
+ 17
HTTP Response: Once the server receives an HTTP request, it processes the request and sends
back an HTTP response.
Status Line: Indicates the HTTP version, a status code (e.g., 200 OK, 404 Not Found), and a brief status
message.
Headers: Provide information about the response, such as content type, caching directives, and
server information.
Body: Contains the requested resource, such as HTML content, images, or any other data.
+ 18
Web Browsers
Web Browsers
1. Rendering Web Content: Web browsers interpret the code of web pages to render them visually. The
primary languages used to create web pages are HTML, CSS, and JavaScript.
HTML: HTML provides the structure and content of a web page Browsers parse HTML to
understand and display the content correctly.
CSS: CSS defines the presentation and styling of web pages. It specifies properties like colors, fonts,
layout, and positioning. Browsers apply CSS rules to render the content with the desired visual
appearance.
JavaScript: JavaScript is a programming language that adds interactivity and dynamic functionality
to web pages. Browsers execute JavaScript code to handle user interactions, manipulate the page's
elements, and fetch data from servers.
+ 20
Web Browsers
2. User Interface: Web browsers provide a user-friendly interface for navigating the web.
The interface typically consists of: Address Bar, Navigation Buttons, Bookmarking, Tabs, History
3. Extensions and Add-ons: Web browsers often support extensions or add-ons, which are
additional software components that enhance functionality.
These can include ad blockers, password managers, developer tools, language translators, and
more.
4. Security and Privacy: Web browsers play a crucial role in ensuring a secure and private
browsing experience. They implement measures like:
Secure Socket Layer (SSL), Cookie Management, Privacy Settings, Phishing and Malware
Protection
+ 21
HTTP Authentications
HTTP Authentication It is a security mechanism for verifying a user's identity before granting
them access to protected resources on a web server.
It involves a challenge-response process where the server prompts the user for credentials,
typically a username and password, and then validates those credentials against a stored
database or authentication server.
HTTP Authentications
Basic Authentication:
This is the simplest form of HTTP authentication.
HTTP Authentications
Digest Authentication:
Instead of sending the user's password in plain
text, Digest Authentication uses a cryptographic
hash function to protect the password.
HTTP Authentications
OAuth is commonly used for authentication with services like social media platforms.
+ 25
The End