0308 how the web/browser works

Youngin Lee·2021년 3월 8일
0

TIL - Web

목록 보기
1/1
post-thumbnail

How the Web works🔗

  1. The browser goes to the DNS server, and finds the real address of the server that the website lives on (you find the address of the shop).
  2. The browser sends an HTTP request message to the server, asking it to send a copy of the website to the client (you go to the shop and order your goods). This message, and all other data sent between the client and the server, is sent across your internet connection using TCP/IP.
  3. The browser sends an HTTP request message to the server, asking it to send a copy of the website to the client (you go to the shop and order your goods). This message, and all other data sent between the client and the server, is sent across your internet connection using TCP/IP.
  4. The browser assembles the small chunks into a complete web page and displays it to you (the goods arrive at your door — new shiny stuff, awesome!).

What happens when you type in a URL 🔗

  1. You enter a URL into a web browser
  2. The browser looks up the IP address for the domain name via DNS
  3. The browser sends a HTTP request to the server
  4. The server sends back a HTTP response
  5. The browser begins rendering the HTML
  6. The browser sends requests for additional objects embedded in HTML(images, css, JavaScript) and repeats steps 3-5
  7. Once the page is loaded, the browser sends further async requests as needed

이것이 일반적인 대답이지만 브라우저의 사양을 고려해서 조금 더 디테일하게 대답할 수도 있다.. 그러기 위해선 크롬이 어떻게 돌아가는지를 알아야한다.

Google Chrome Browser - definition 🔗

Google Chrome browser is an open source program for accessing the World Wide Web and running Web-based applications.

The Google Chrome Web browser is based on the open source Chromium project.(...) The Goolge Chrome browser takes a sandboxing-based approach to Web security. Each open website runs as its own process, which helps prevent malicious code on one page from affecting others(or the computer operating system at large). The browser also supports Web standards such as HTML5 and cascading style sheets.

요즘 브라우저는 웬만한 유명 사이트의 DNS query를 다 알고 있다고, 즉 DNS정보가 클라이언트에 등록되어있음.

DNS Prefetching 🔗

Problem DNS resolution time can lead to a significant amount of user preceived latency. The time that DNS resolution takes is highly variable. Latency delays range from around 1ms(locally cached results) to commonly reported times of several seconds.

Solution DNS prefetching is an attempt to resolve domain names before a user tries to follow a link. This is done using the computer's normal DNS resolution mechanism. Once a domain name has been resolved, if the user does navigate to that domain, there will be no effective delay due to DNS resolution time.

http port number 80
https port number 443
http로 프로토콜을 입력해도 https 로 redirect/rewrite해준다.

https에서 인증 과정을 마치고 암호화를 마친 다음, html document, javascript 등의 리소스를 네트워크에서 받아오면서 크고 무거운 image 파일들을 나중에 받아온다.

profile
🤔🤔

0개의 댓글