Basics Of HTTP & HTTPS
HTTP
HTTP stands for Hyper Text Transfer Protocol, and it is the communication protocol used for web browsing. It follows a model which is message based. In this case, the client makes an HTTP request to the server and the server responds with a source which is displayed in the browser.
It basically works on a request-response model.
URL :
URL stands for Uniform Resource Locator. It is also termed as a web address. In many web browsers, the URLs are displayed above the page in an address bar.
Format of an URL :
http://www.xyz.com/search?item=vw+bettle
Protocol — (http)
Domain — (www.xyz.com)
Path — (search)
Parameters — (item=vw+bettle)
- Protocol: Mostly used protocols are HTTP and HTTPS.
- Domain: Name which is used to identify one or more IP addresses where the resource is located.
- Path: It specifies the location of the resource on the server.
- Parameters: Its is the additional data used to identify or filter the resource on the server.
HTTP Methods :
- GET — Requests data from a specified resource where it is not modified. It generally does not modify the state of the resource.
- POST — It is used to generate a resource i.e. to send data to the server.
- PUT — It is used to update the existing resource on the server.
- HEAD — It is similar to GET but you don get the body in the output of HEAD. It is used to check whether the resource is present at the server before the GET request.
- OPTIONS — It is used to describe the communication options available for the target source.
- PATCH — It applies partial modifications to the resource.
- DELETE — It deletes the specified resource.
- TRACE -It is designed for diagnostic purpose.
HTTPS :
It is the secure version of the HTTP protocol. It stands for Hyper Text Transfer Protocol Secure. It provides encrypted communication between client and server. The encryption is achieved using the Transport Layer Security (TLS) os Secure Socket Layer (SSL)
Therefore the HTTPS is also called as HTTP over TLS or HTTP over SSL.
Both TLS and SSL use an asymmetric encryption system.
The asymmetric encryption system uses a public key (encryption key) and a private key (decryption key)to encrypt a message. Anyone can use the public key to encrypt a message. However, private keys are secret, which means only the intended receiver can decrypt the message.
SSL / TLS Handshake :
When you request a HTTPS connection to a website, the website sends its SSL certificate to your browser. The process where your browser and website initiates communication is called as SSL/TLS Handshake.
Benefits of HTTPS :
The major benefits of HTTPS are :
- Customer information like credit card numbers and other sensitive information is encrypted and cannot be intercepted.
- Visitors can verify you are a registered business and that you own a domain.
- Customers know they are not supposed to visit sites without HTTPS, and therefore, they are more likely to trust and complete purchase form sites that use HTTPS.
-Happy Learning.