Explain in detail the steps/processes that occur from the moment you type a URL in a browser and hit enter

In an extremely rough and simplified sketch, assuming the simplest possible
HTTP request, no proxies and IPv4 (this would work similarly for IPv6-only
client, but I have yet to see such workstation):

  1. browser checks cache; if requested object is in cache and is fresh, skip to
    #9
  2. browser asks OS for server‘s IP address
  3. OS makes a DNS lookup and replies the IP address to the browser
  4. browser opens a TCP connection to server (this step is much more

    complex with HTTPS)

  5. browser sends the HTTP request through TCP connection
  6. browser receives HTTP response and may close the TCP connection, or

    reuse it for another request

  7. browser checks if the response is a redirect (3xx result status codes),

    authorization request (401), error (4xx and 5xx), etc.; these are handled

    differently from normal responses (2xx)

  8. if cacheable, response is stored in cache
  9. browser decodes response (e.g. if it‘s gzipped)
  10. browser determines what to do with response (e.g. is it a HTML page, is it

    an image, is it a sound clip?)

  11. browser renders response, or offers a download dialog for unrecognized

    types

Again, discussion of each of these points have filled countless pages; take this
as a starting point. Also, there are many other things happening in parallel to

this (processing typed-in address, adding page to browser history, displaying
progress to user, notifying plugins and extensions, rendering the page while
it‘s downloading, pipelining, connection tracking for keep-alive, etc.).

时间: 2024-10-24 11:11:51

Explain in detail the steps/processes that occur from the moment you type a URL in a browser and hit enter的相关文章

Cracking the coding interview汇总目录

很久之前刷的CTCI的题目,都快忘记了,做个分类汇总,再重新好好复习一遍. Chapter 1 | Arrays and Strings 1.1 Implement an algorithm to determine if a string has all unique characters. What if you can not use additional data structures? 1.2 Write code to reverse a C-Style String. (C-Str

maven 环境变量设置和Java maven工具配置 on windows 7

How to install maven on windows 7 from:http://howtodoinjava.com/2013/01/02/how-to-install-maven-on-windows-7/ and : http://howtodoinjava.com/2013/01/06/adding-m2_repo-classpath-variable-in-eclipse-ide/ Maven is a build and dependency management tool

McGill Mini Assignment #7 COMP

McGill Mini Assignment #7 COMP 206Vybihal School of Computer Science Page 1 of 7CGI and Basic Web InterfacingDue: December 3, 2019 on myCourses at 23:55Lab J will provide some background help for this mini assignment.Week 10, slides 28 to 44 will hel

MYSQL EXPLAIN执行计划命令详解(支持更新中)

本文来自我的github pages博客http://galengao.github.io/ 即www.gaohuirong.cn 摘要: 本篇是根据官网中的每个一点来翻译.举例.验证的:英语不好,所以有些话语未必准确,请自行查看官网,若有些点下面没有例子的是因为当时一下子没有想出那么多来,如果大家有遇上好的例子,欢迎在下面留言我持续更新 查看执行计划的关键EXPLAIN 版本MYSQL5.6,用到的库是官网例子sakila,自行下载导入 由于要把每个点都翻译出来,还需要举例,所以需要一定的时间

SQL优化(3):使用explain了解SQL性能-part2

接上文,上文对type列用实例做了说明,本文对Extra列进行一些说明. Extra列 Using filesort 前文说,需要对所有的查询结果进行一次排序,例如当使用order by时.但是若查询时用到了index,那么对于order by来说可能就不需要排序了,因为index数据就是按照有序的方式存储的,即按照index的方式进行排列即可. 按照某一列(非主键)进行排序 mysql> EXPLAIN SELECT * FROM t1 ORDER BY c_str_value; +----+

【MySQL】优化—工欲善其事,必先利其器之EXPLAIN

接触MySQL已经有一段时间了,了解如何优化它也迫在眉睫了,话说工欲善其事,必先利其器.最近我就打算了解下几个优化MySQL中经常用到的工具.今天就简单介绍下EXPLAIN. 环境准备 Explain 介绍 id select_type table type possible_keys key key_len ref rows Extra Explain extended 选项介绍 环境准备 1. MySQL版本 mysql> select version(); +---------------

SQL优化:使用explain

前文说了EXPLAIN的输出的含义,本文实战一下. Database Schema DROP DATABASE dbTest; CREATE DATABASE dbTest; USE dbTest; CREATE TABLE t1 ( c_primary_key INT, c_unique_key CHAR(64), c_unique_not_null_key CHAR(64) NOT NULL, c_key CHAR(64), c_multi_key_part1 CHAR(64), c_mul

MySQL EXPLAIN SQL 输出信息描述

EXPLAIN语句能够被用于获取一些关于SQL执行时的相关信息,比如表的连接顺序,对表的方式方式等等.通过对该相关信息进行进一步的分析,我们 可以通过对表添加适当的索引,以及优化连接顺序,使用提示等等手段来达到使SQL高效运行的目的.本文描述了EXPLAIN的用法并给出了相关示例. 一.EXPLAIN概述 EXPLAIN 语句主要是用于解析SQL执行计划,通过分析执行计划采取适当的优化方式提高SQL运行的效率. EXPLAIN 语句输出通常包括id列,select_type,table,type

mysql explain的使用(优化查询)

使用方法:在select语句前加上explain 就可以了,如: explain select * from user where id = 1 结果: +----+-------------+-------+-------+------------------+---------+---------+-------+------+-------+ | id | select_type | table | type | possible_keys | key | key_len | ref |