Connecting with Computer Science: What is the Internet, HTTP, and HTTPS?6 min read
Internet is actually just a collection of WANs (Wide Area Network), and LANs (local area network).
LAN – A network of computers in a single building or in close proximity
Learning fundamental concepts of the internet such as TCP/IP, OSI model, IP, subnet, DHCP, FTP, POP3, SMTP is crucial, but on this limited article, we will just dig more about HTTP and some concepts around it. All of these others will be explained in other articles.
What is HTTP?
You can also expand this section to see more about the certificate of the website you are currently in, the cookies this website uses and more.
The performance of web sites and applications can be significantly improved by reusing previously fetched resources. Web caches reduce latency and network traffic and thus lessen the time needed to display a representation of a resource. By making use of HTTP caching, Web sites become more responsive.
A web cache is information technology for the temporary storage of web documents, such as HTML pages and images, to reduce server lag.
An HTTP cookie (web cookie, browser cookie) is a small piece of data that a server sends to the user’s web browser. The browser may store it and send it back with the next request to the same server. Typically, it’s used to tell if two requests came from the same browser — keeping a user logged-in, for example. It remembers stateful information for the stateless HTTP protocol.
HTTP headers allow the client and the server to pass additional information with the request or the response. An HTTP header consists of its case-insensitive name followed by a colon ‘
:‘, then by its value (without line breaks). Leading white space before the value is ignored.
HTTP request methods
GET method requests a representation of the specified resource. Requests using
GET should only retrieve data.
POST method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server.
There are several other methods but for now, we should focus on 2 common methods above.
HTTP response status codes
HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes: informational responses, successful responses, redirects, client errors, and servers errors.
- 200 OK
- 201 Created
- 400 Bad Request
- 401 Forbidden
- 404 Not Found
- 405 Method Not Allowed
- 422 Unprocessable Entity
Cross-Origin Resource Sharing (CORS)
Cross-Origin Resource Sharing (CORS) is a mechanism that uses additional HTTP headers to tell a browser to let a web application running at one origin (domain) have permission to access selected resources from a server at a different origin. A web application makes a cross-origin HTTP request when it requests a resource that has a different origin (domain, protocol, and port) than its own origin.
XMLHttpRequest to make a request for
HTTP messages are how data is exchanged between a server and a client. There are two types of messages: requests sent by the client to trigger an action on the server, and responses, the answer from the server.