banner
朝闻道

朝闻道

做个知行合一的人
email

Web Front-end Basics - How We Access Web Pages

Taking static web pages as an example.

HTML File#

An HTML file is a file that can be read by a browser to generate a static web page. This file is written in HTML language, which is known as Hypertext Markup Language. The "hyper" in this language is reflected in the addition of structured syntax - tags - to plain text, giving it structured attributes such as headings, paragraphs, menus, lists, links, etc. In addition, HTML files also support embedding images, videos, and more.

Server#

A server is a connected computer used for storing files.
A server is a connected computer, specifically used for storing files (about the size of a box). Each server has a unique IP address for interaction.

Supplement

  • A static website server refers to sending files to users as they are.
  • A dynamic website server adds new functionality beyond hardware and HTTP software, commonly used for application servers and databases. Files are updated when sent.

IP Address#

An IP address is a 32-bit binary number (which makes it difficult for humans to remember).
An IP address is like a phone number for each person, where each person's phone number is unique.
Similarly, every connected computer has a unique IP address. Once we know this address, we can determine the location of files stored on the network.

URL Address#

URL is a simplified Internet resource locator, commonly known as a web address, which can be associated with an IP address (solving the problem of inconvenient memorization of IP addresses).
The composition of a URL: protocol + domain name + resource path.

  • For example, "wendys.love" is the domain name, "https://wendys.love" is the protocol + domain name, and "https://wendys.love/archives/hello-world.html/" is the protocol + domain name + resource path.
  • In general, the protocol can be omitted when accessing. Additionally, the HTTPS protocol is more secure than the HTTP protocol.
  • Similarly, every file on the Internet has a unique URL.

Browser#

A browser is a tool for parsing and rendering HTML, CSS, and other files. It is also a tool for parsing URLs and acts as a bridge for interaction between the client (user) and the server.
Users input the URL (web address) into the browser, the browser parses the corresponding IP address of the URL, and sends an interaction request to that IP to obtain permission to access the file.

The process of accessing a web page can be described as follows:

  1. User inputs the URL into the browser →
  2. Browser parses the URL → Browser sends a request to the IP address →
  3. Server responds, approves the request, and sends the corresponding file to the browser →
  4. Browser visualizes and renders the file, presenting a visual page to the user.

Traffic#

If the server is located abroad (or far away from you), the access duration will be slow and the consumed traffic will be high.
This is because the physical distance is too far, which is a disadvantage.
Therefore, people have invented Content Delivery Network (CDN) services, which cache files from the main server in various regional secondary servers. When a user accesses a website, the content from the nearest secondary server is directly returned to the user, reducing physical distance, speeding up access, and saving traffic.

The above is my shallow understanding.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.