After receiving a user input to the URL, the browser will open a county to process the request, the user inputs URL
the address analysis to determine if it is HTTP
the protocol according to HTTP
the way to deal with.
Method 2 corresponds to invoke the browser engine, such as WebView
the loadUrl
method of analysis and load the URL
address.
3 by DNS
analyzing data acquired the site corresponding to the IP
address, after the completion of inquiries in conjunction with the browser COOKIE
, userAgent
and other information to the website purpose IP
issued GET
request.
4 HTTP
protocol session, the browser client to the Web
server to send messages.
5 into the site's back-end Web
server processes the request, such as Apache
, Tomcat
, Node.js
and other servers.
6 deployed into the back-end applications, such as PHP
, Java
, Javascript
, Python
and other back-end program, to find the corresponding request processing logic may read the server cache or database queries during this period.
7 server processes the request and sends a response at this time if the browser has visited the page, there is a corresponding cache resources, last modified record will contrast with the server, consistent returns 304
, otherwise it returns 200
and the corresponding content.
7 browser to start downloading HTML
the document (header status code response 200
time) or read the contents of the file from the local cache (browser cache or effective response header status code 304
when).
8 The browser receives the downloaded HTML
file parsing structure established DOM
( Document Object Model
document object model) document tree, and in accordance with HTML
the request to download the tag specifies MIME
the type of file (e.g. CSS
, Javascript
scripts, etc.), and set the contents of the cache and the like.
9 page rendering start parsing DOM
, CSS
parse and combined according to the rules of DOM
the document tree layout and rendering Web content rendering, Javascript
to provide DOM API
operation DOM
, and read the browser cache, the event binding, etc., the whole page display process is completed.