How can we make a good website? Article 6: How can others access your website?

Source: Internet
Author: User
Tags website server

How can someone enter a domain name in a browser to access your website? This problem looks very long. At first glance, I still think it is very simple. After careful consideration, I feel more and more complicated.

 

The principle of Website access is a process that must be deeply understood by the website maker. Note that this is very important and is more important than. Net Java performance efficiency access. Because the foundation of your work

 

Let's first explain why we must understand this principle:

1. It has a very strong relationship with the functions of your website. Different program running sequence may lead to many functions, but they do not work. You still cannot find the reason.

2. The implementation of website functions depends on css js and interactive Ajax.

3. Basic website Function Maintenance

4. Where can I solve a website error?

 

Well, in fact, there are many reasons, and I will not list them one by one. It doesn't make much sense. Let's take a quick look at how to complete this process.

 

Step 2: If the website has a global setting file, execute the program on the website server first. Note that this process takes precedence over the process when you access the website.

Step 1: Someone else enters the website address, finds the corresponding IP address through the DNS server on the network, and finds your server

Step 2: if there is a website service on the server and the default access port is 80, access the directory based on the bound Domain Name

Step 3: According to the settings of the website server, there is a default access file name, such as index. asp, the file is automatically accessed; otherwise, Error 404 is reported.

Step 4: the user's browser starts to read your page file, that is, HTML code.

Step 5: The Web browser interpreter starts to download the external css js imgfile based on the external reference file in HTML.

Note: Due to browser design problems, there are two "channels" for downloading external files at the same time, and other files are queued. After the previous files are completed, the following files will be downloaded, if the download speed of multiple files is slow, the download of all files will be affected!

If the file cannot be found, it will be skipped ~

Step 6: The webpage starts to interpret HTML from top to bottom and Will synchronously refresh the style definition and JS definition of labels in the webpage.

Step 7: the browser verifies whether the JS definition is complete and whether JS errors exist. If yes, an error is thrown.

 

Note: steps 6 and 7 are executed alternately.

 

Maybe experienced kids may doubt whether this process is correct. Why don't there be anything defined in the framework? For example, when ASP. NET is loaded, the page_load event will be started. There are also destruction events after the webpage is loaded.

In each dynamic language, there are definitions similar to what needs to be executed during loading before loading. These definitions aim at more detailed processes. When a user applies for access or requests to read HTML, the program will read from the compiled files (for example, Asp.net is the DLL dynamic link library file in Bin, java is the jar package), find the namespace or the method corresponding to the package, and then execute it to generate the HTML required by the user.

However, the applications submitted by our browser do not directly call these methods. Please note that what we need is only the result, HTML code is generated by the program.

 

This is the core of a website. The HTML code determines the presentation of the website.

 

Therefore, any platform can generate the qualified HTML code you need and use any language.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.