current position:Home>Zero basic front end - 01 - HTML foundation - Basic Concepts (recommended Collection)

Zero basic front end - 01 - HTML foundation - Basic Concepts (recommended Collection)

2021-08-21 11:44:19 Geek Jiangnan

What is a browser

  • Browser is a software installed in the computer , Be able to present web content to users for viewing , A software that allows users to interact with web pages . like QQ The same is a software installed in the computer , It's just different functions

  • Common mainstream browsers

  • Different browsers Yes Different browser cores , The browser kernel is the rendering engine used by the browser , The rendering engine determines how the browser displays the content of the web page , This leads to browser compatibility problems
    • IE kernel Trident
    • Google kernel WebKit / Blink
    • Firefox kernel Gecko
    • Safarri kernel WebKit
    • Oupeng Presto
  • In the early stage, Google browser was mainly used , The browser compatibility problem will be described in detail later

What is a server

  • The server is also a computer , It's just better than our computers Higher configuration Our computer , also 24 Hours No power supply , Don't turn it off The computer
  • Server is Dedicated to storing data The computer , Visitors can Access server get Resources stored on the server
  • The server Once shut down , Visitor on cannot access

The principle of accessing web pages

How browsers request data

  • How do we view the content on the web page through the browser ?

  • 1. open IE Cache folder

    • C:\Users\Jonathan_Lee\AppData\Local\Microsoft\Windows\Temporary Internet Files
    • Jonathan_Lee User name for PC
  • 2. Empty this folder

  • 3. use IE Open the web page

  • 4. I found a lot of files in the folder (.html、.css、.js、.png etc. ), It is not difficult to find that these files are actually the contents of the visited web page

  • 5. Conclusion

    • When visiting a web page, there are Actual 、 Physical file transfer
    • Webpage Not a file , It is A pile of papers Composed of
    • The reason why we usually feel that the second visit is faster than the first visit is , All the files have been deleted on the first access cache To the local

The process by which a browser requests data

  • 1. When you press enter, the browser according to the entered URL The address to send Request message
  • 2. The server receives the request message , Would be right Request message To deal with
  • 3. The server passes the processed results through response message Back to the browser
  • 4. browser Parse the results returned by the server , Show the results
  • Request process validation
    • 1. utilize chome The browser opens a web page
    • 2. Open developer tools
    • 3. open Network View request message and response message
      • 3.1 Request message
      • One HTTP The request message is sent by the request line (request line)、 Request header (header)、 Blank lines and request data 4 Parts of
      • 3.2 response message
      • One HTTP Response message from response line 、 Response head 、 The response body consists of

What is? URL

  • 1. The address we enter in the address bar of the browser is actually URL

  • 2.URL Format :

    • ( The browser will automatically complete http: and :80)
    • ( The browser will automatically complete :80)
    • ( Full format )
    • Protocol type ://ip Address : Port number / Resource path / Resource name
  • 3.URL Split

    • Network protocol type http://
    • The server IP Address
    • Server port number :80
    • Resource path The path of the web page on the server
    • Resource name index.html
  • 4.URL The function of each part after splitting

  • 4.1 The server IP Address and The server port number is the function of both :

    • Tell the browser where to go to find the corresponding server , That is, tell the browser the detailed address of the server
    • The server IP The address is equivalent to the address in real life ; for example : Tanganyuan, Tianhe District, Guangzhou city
    • The server port number is equivalent to the house number in real life ; for example : 9 building 909 room
    • So if you combine the address and house number , Is my detailed address
  • 4.2 Resource name its function :

    • Tell the server which file I need to get
  • 4.3 Resource name

    • Name of the file to be accessed

  • 5. Add
    • URL Full name Uniform Resource Locator( Uniform resource locator ), Every resource on the Internet has a unique URL Address
    • because IP The addresses are all numbers , There is no meaning , It's hard to remember . So the most common way to visit a web page is not IP The address is “ domain name ”( A string of meaningful letters OR Numbers )
    • like : AND

What is? HTTP agreement

  • 1.HTTP yes Hypertext Transfer Protocol Abbreviation , Hypertext transfer protocol

  • 2. What is an agreement ?

    • There are many agreements in real life , For example, rental agreement / Sale and purchase agreement / Divorce agreement
    • No matter what the agreement is, they have one thing in common , Is used to regulate / Restrict a certain kind of things
  • 3. Communication problems ?

    • The most common problem in communication is language barrier , For example, Chinese communicate with Americans , A person speaks Chinese , One person speaks English , If neither of them knows Chinese or English , Then there will be communication problems
    • If you want to solve the communication document , Is it necessary to draw up regulations first , Both speak Chinese , Or both speak English , Or ask a translator who knows both Chinese and English
  • 4.HTTP Protocols are used to regulate / Restrict what kind of things ?

    • When a browser accesses a web page, it actually requests data from the server , So the browser needs to communicate with the server , So there will be communication problems
    • HTTP The agreement is equivalent to that we let both people speak Chinese or both speak English , Is to standardize how two people communicate in advance , That is, norms / Constrains how browsers and servers communicate

Other knowledge reserves

  • stay Windows How to view the file extension in the system

    • By default Windows The system does not display the file extension , But as a developer , Viewing file extensions is a necessary skill for us
    • win10: Open any folder –> Click to see –> Check the file extension option
  • A file on the computer can " meanwhile " Opened by multiple software , Different software opening may have different effects

    • for example : The same index.html Files can be opened by multiple browsers and notepad
    • for example : .html The file is opened through the browser and cannot be edited , By opening Notepad, you can edit
  • What is a plain text file ?

    • We Windows There is a software installed by default on the computer called Notepad . This software is specially used to open plain text files , So as long as Can be opened by Notepad , And can display All the documents are Plain text file
    • .html Files can be opened by Notepad , And can display , therefore .html A file is a plain text file

It's not easy to code words , Ask for three company support online .

Remember before collection , Like it first ! Good articles are worth seeing by more people .

Recommended reading :

13 swastika C Language nanny level course 2021 edition

10 swastika Go Language nanny level course

2 swastika Jquery Introductory tutorial

3 swastika html +css Introductory tutorial

169 Set nanny level C Language video

Last , One more word , Fan doggerel , Pay attention to brother Jiang and don't get lost , Take you programming on high speed .

copyright , Do not reprint , For reprint, please contact me to authorize

copyright notice
author[Geek Jiangnan],Please bring the original link to reprint, thank you.

Random recommended