Web Applications – Basic concepts over HTTP / HTTP2 and HTTPS protocol
This article is part of a series of content aiming to provide up-to-date and meaningful insights about what’s happening under the hood of a website. This is particularly useful if want to optimize your page or start a Search Engine Optimization program in order to have better rankings and that can only be achieved successfully if you completely understand what’s happening on the background.
There are 2 key elements in this operation, which is the concept of the server and the client, explained in the diagram below:
1. Web Client
In web applications, a client is represented by a User Agent on the form of a Browser or an App and its job is to access a service made available by the server.
A User Agent is, by definition, a piece of software acting in behalf of the user, serving to inform the website about the information of the user in order to serve customized and more relevant content.
2. Web Server
A web server is a software responsible for accepting requests from clients and serve back the response with data.
In today’s web, the most common request is HTTP but others exist like FTP. The HTTP server response is normally parsed by a Client Browser commonly a web page.
In order to communicate, servers and clients need to understand the same, standardized language and that comes in the form of a protocol: a standard for enabling communication, connection and data transfer between 2 elements on a network. The most common are:
- HTTP – Stands for Hypertext Transfer protocol and is the most commonly used in the Web today. Works as a intermediary for request-response type transactions in a client-server environment.
- HTTPS – Is the implementation of the normal HTTP protocol but over an aditional level of security using SSL/TLS. This aditional security layer allows information to be transferred over an encrypted connection and also authenticity checks from both client and server sides over digital certificates.
- HTTP/2 – Is a major revision of the HTTP 1.0 protocol and comes from the experiemental SPDY protocol initiated by Google. The new standard was supported by all major browsers and leaves most of HTTP 1.0 high-level syntax, such as methods, status codes, header fields, and URL’s, the same. The element that is modified is how the data is framed and transported between the client and the server.
- FTP – Stands for File Transfer Protocol and is a quick and easy way to transfer files.
When a user opens a website, he does a HTTP request to the server in order to get the page. The server, on its hand, produces the response by delivering the Web Resource, either dynamic (compiled by a programming language like PHP or Python) or static like a PDF or a .zip.
This flow of request-response is called a HTTP transaction.