banner
朝闻道

朝闻道

做个知行合一的人
email

Web Front-end Basics - How We Access Web Pages

Taking static web pages as an example.

HTML Files#

HTML files are files that can be read by browsers to generate static web pages. These files are 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 properties 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 sent will be updated.

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, and each person's phone number is unique.
Similarly, every connected computer has a unique IP address. Once we know this address, we can know 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. Also, 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. It is the bridge for interaction between the client (user) and the server.
Users input the URL (web address) into the browser, and 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. The user inputs the URL of the website into the browser →
  2. The browser parses the URL and sends a request to the IP address →
  3. The server responds, approves the request, and sends the corresponding file to the browser →
  4. The 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 time will be slow, and the consumed traffic will be high.
Because the physical distance is too far, it is a disadvantage.
Therefore, people invented Content Delivery Network (CDN) services, which cache files from the main server located far away in secondary servers in various regions. When a user accesses a website, the content from the nearest secondary server is directly returned to the user, achieving the goal of 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.