How websites works? If someone ask you things question can you answer it. We have browsers to go to a website like Google Chrome, Firefox, and Safari etc. When you type a website URL in the search bar what happen? Is that through internet the browser makes a request all the way to another machine and the other machine we call a server is located anywhere in the world. The location doesn’t really matter because through our internet network the browser is going to say the website that we type in the search bar of browser that which machine can server me the files for that website.
Now, it going to find the website server that is a computer. When you submit a request to the server for website servers send you data and without data you are not able to display anything on the browser.
In this article we will learn:
- How Websites Works
- What is a Web Server?
- What is HTTP or HTTPS?
- Communication between Website and Server
- Things Server needs to show us Website Page
What is a Web Server?
When we browse website on the internet then we sent and receive data between out computer and internet. So, we need something to give us this date. As you know humans can’t do this then servers came into handy. Servers give us the data when we visit a website. The basic meaning of a server is to serve. It is a computer connected to the internet and its function is to serve the requests that we sent from our browser or computer.
Servers have different types. Like web server gives the data about a particular website and file server has the storage for files and it provides the files to its user when they request the files.
What is HTTP or HTTPS?
HTTP (Hyper Text Transmission Protocol) is protocol used by websites to transfer HTML file between two computers. So, we can say it’s a protocol that is also used to communicate to a web server. When you go to a website with the browser, the browser use the HTTP protocol to communicate with the sever to give you data about the website. HTTPS (Secured Hyper Text Transmission Protocol) is the latest version of HTTP. This means HTTPS is more secure than HTTP.
HTTP is based on the model of client and the server. The client is your browser or computer from which you are requesting a webpage to the server and the server is the service provider.
Communication between website and server
First websites communicate with the servers over something called HTTP and HTTPS. As you know the browser and server are two different machines. The browser is on your computer and the server is located anywhere in the world. So, we need rules to communicate with the server. Remember without rules you can’t communicate with the machines on the internet. For example we are talking in English in the same way HTTP and HTTPS which is a secured version of communication say to the server that I need data about this website and the server understand that this browser needs the data I have.
When you type a URL in the search bar of the browser you see it automatically becomes HTTP or HTTPS because it’s the rule to communicate to the website you typed in the bar. These are the languages to communicate to the websites. When you hit enter in the browser, it makes a request to the server and then the server is going to respond your browser with the data you requested.
Things Server Needs to Show us Website Pages
So, the server has these three files and it send these files to our computer’s browser. The browser straightly asks for the data and server send the data in the form of these three files. So, the browser is able to display us the webpage with the data sent by the server.
We discussed how websites work and a little talk about server and HTTP. Websites use many other technologies to make increase functionality. Servers use PHP programming languages to understand the requests sent by the client browser and then process it according to its rule made by the owner. There are also other types of servers like print server and database server.