Parts of HTTP request

HTTP request has three parts, forth part is optional, but I will mention it:

1. First one is protocol to be used. Protocol can be one of the following. It can be either HTTP or HTTPS. S at the end specifies that this is a secure version of communication. Sensitive information such as username and password, banking or payment information needs to use secure version.

It is a good idea to encrypt all of the communications, it means that sys admin will sleep well.

2. Second part is the host name or domain name. Typically we see www in front of domain name, however web browsers like Chrome will not display protocol that is being used and they will not display www. Hostname can be anything, it is just typical use of www.

3. Third part is the page to be accessed.

4. Fourth part is optional. It is port number for communication. Typical port numbers are 80 and 443. Port 80 is used for non-secure communication, and port 443 is used for secure communication. However any port number in the valid port range can be used.

It is possible to provide data in GET HTTP request, but I will explain it separately.

YouTube video

Comments

Popular posts from this blog

Absolute and relative path in HTML pages

Errors

goto PHP operator