-
Let's talk about browsers and servers.
-
This video will teach you
about their purpose
-
and how they contribute to the giant
network that we know as the Internet.
-
What happens when you request
a website in your browser?
-
Well, every time you type
a web address and press Enter,
-
a series of things happen
in the few seconds
-
it takes for the website
to appear on your screen.
-
Over recent decades
there have been many web browsers.
-
Some of the most popular today
are Chrome, Firefox, Safari,
-
Internet Explorer, and Opera.
-
All of these browsers serve the same basic
purpose to display websites for you
-
to read and interact with.
-
But just how do they do this?
-
First, the browser takes
the web address you provided
-
and sends a request
to a server across the Internet
-
for the files that make up the website.
-
The contacted server is dedicated
to hold the website's files.
-
It may even be thousands of miles
away from you and your device.
-
Once a server receives the request,
-
it contains logic
for processing the request
-
and identifying the files and data
that the client has specified.
-
It responds to the browser's
request with the necessary files.
-
This is a process that allows the browser
to display website files to you
-
and it happens in a few seconds
it takes for websites
-
to load on your device screen.
-
You may be asking yourself
what is a server?
-
A server is a specialized computer
connected to a network.
-
The role of this computer is to listen
for requests from network devices
-
and send back data.
-
Servers provide or serve up
resources like website files, data,
-
and assets like images or videos
along with other cool things.
-
Servers are not like the computers
you may be used to.
-
They are focused
on data storage and retrieval
-
so they have no monitors or keyboards.
-
A server will need lots of computing power
-
to serve up websites that reach
thousands or even millions of users.
-
Next, we need to understand
-
how the browsers and servers
understand each other.
-
The Internet follows protocols or rules
-
that govern the format of data
sent over the Internet or other networks,
-
Browsers and servers
communicate with one another
-
using the Internet protocol known as HTTP.
-
You've seen this before.
-
HTTP, or hypertext transfer
protocol, allows for data transfer.
-
When you see the 's' at the end of HTTP
the data is being transferred securely.
-
An important part of the hypertext
transfer protocol is that each request
-
has a request method that specifies
the type of request being made.
-
For example, if the user
is just asking to fetch a resource
-
this is specified as a GET request.
-
If a user is sending data
to the server, for example,
-
such as submitting information via form
this is specified as a POST request.
-
When the server sends back a response
-
it sends a status code that accompanies
the requested resource.
-
You might be familiar
with scene 404 error messages
-
when browsing the Internet.
-
This is an HTTP response code
-
that indicates that the requested
content wasn't found.
-
HTTP provides a reliable structure
-
to the interplay between
the client and the server.
-
Let's review what we learned today.
-
There are three important
things to remember.
-
One, the browser sends
requests to the server
-
and displays or renders website files.
-
Two, the server stores website files
-
and sends them to the web
browser upon a request.
-
Three, HTTP, or hypertext transfer
protocol, is a standardized set of rules
-
for how browsers and servers
transfer data to one another