Deal with the response

Assess the network cache

An origin is a tuple comprising the hostname, the scheme/protocol, and also the port. If any of those are distinct when compared to a different origin, they are considered to be distinct origins.
Once a URL was provided to load, a few things occur under the hood.

If desired to load a JavaScript file that is from, it might be making a cross-origin resource request on which the browser would apply the same-origin policy. To allow this behavior, would need to collaborate with by defining CORS (Cross-Origin Resource Sharing) headers that empower to have the ability to load the JavaScript file from It is good practice to set the CORS headers so the source requests that are cross-origin can be appropriately dealt with by browsers.

Resource version

Assess for support employees

Check for link

Then, the browser should learn whether a service employee is accessible to handle the request–this is particularly crucial in the case that the user is offline and doesn’t own a network link. They empower offline-capable sites by allowing interception of network requests (like the top notch petition ) therefore the requests can be served by a script-controlled cache.

This point has, the navigation URL that was asked entered to the browser background, making it available for navigation at the forward and back functionality of the browser.
In some cases, the browser could be able to predict which domain names will be accessed, and connections to all those domain names can be primed. The page can sign up to the browser which to sequential links to using resource hints such as rel="preconnect" on the link tag. One such scenario where using resource hints is useful is when an individual is on a Bing search results page, and there is an expectation that the first few search results are likely to be visited. With not having to pay the cost of link setup and a DNS lookup later on when these links are clicked, in this case, priming connections to those domains can help.
In a case where there is no service employee to handle the first request (or when Navigation Preload is being used), the browser moves on to consulting the networking layer.

Flowchart showing the path from server to client
Click for full-size image

The system cache is not the sort of cache in the browser. There are programmatic caches that can be leveraged via JavaScript. Especially an initial resource petition for your page can be redeemed by the service worker and may subsequently use the site a item which was defined by the website by one of its caches. This can be helpful, since it supplies control to the website over exactly what cached things to use when. These caches are origin-bound, which means that every domain has its own sandboxed set of caches it can control that are isolated from the caches of another domain.
Is the top notch page petition. This is going to be.

Establish link


Obviously, the network cache has a quota that impacts both how many items will be saved and how long they will be kept for. This doesn’t indicate that the site doesn’t get a say in the subject. The browser’s caching logic is controlled by cache-Control headers in responses. Sometimes, it is wise to distinguish the browser not to cache a product at all (such as with Cache-Control: no-store), since it is predicted to always be different. In other cases, it is logical to have the browser cache the product indefinitely through Cache-Control: immutable, because the answer for any given URL will never change. In such a case, it makes sense to use URLs to point to various variations of the identical source rather than making an alteration to a resource of the identical URL because the cached version would be used.
Then, the browser will attempt to understand the type of the file being delivered to the browser, so it can appropriately interpret the way to load the file. As an image, an image file will be loaded for instance, whereas HTML will be parsed and left. If the HTML parser is engaged, so that the browser can start those downloads beforehand before the page starts to render the contents of the answer will be scanned for URLs of resources that were probable to be downloaded. This will be covered in detail by the next post in this series.

As mentioned before, the browser handles a network cache, allowing previously downloaded tools to be reused in several scenarios. This is particularly helpful for unchanging resources, like logos and JavaScript out of frameworks. It’s important to benefit from the cache as far as possible, because it can reduce the amount of incoming network requests by instead reusing the resource that is accessible. In turn, this helps minimize the otherwise laborious and latent-prone operations that are required, improving the webpage load time.
The source is an important concept for the browser, because it defines how information secured and is sandboxed. Typically, for security purposes, the browser enforces a same-origin policy, meaning that one origin cannot access the information of another source –both would have to be the same origin. Especially, at the caching case presented before, neither nor can see the programmatic cache of the other.
Now that you know how we proceed from the server to the client–and all of the details in between–stay tuned in loading a web page to find out : how we proceed to the DOM.
If the server response chunked or is compressed, the browser will attempt to decompress and dechunk it.

The response data is analyzed, Since the information is being streamed over to the client. First, the browser checks the headers of the response. HTTP headers are all name-value pairs which are sent as part of the HTTP answer. When the headers of the response signal a redirect (e.g., through the Location header), the browser begins the navigation process all over again and returns to the very initial step of assessing if an HSTS upgrade is required.
Here’s a flowchart that Provides an overview of what’s been discussed so far, using a Little More detail to you:
Since the answer has been read, the browser will kick off writing it into the network cache in parallel.
If it’s an HTTP request, the browser should check if the domain is at the HSTS listing (HTTP Strict Transport Security). This list is comprised of a preloaded list to using HSTS plus a list of websites that opted-in . There is a request made to the HTTPS version of the URL instead of HTTP if the requested HTTP server is at the HSTS list. That is why you’ll see that even if you attempt to sort to a contemporary browser, it will send one to instead.

The browser, via the network layer, will assess if there is a fresh response in its cache. This is usually defined by the Cache-Control header in the response, where placing a max-age can define the length of time the cached item is considered fresh, and placing no-store indicates whether it should be cached in any way. And whenever the browser finds nothing in its own network cache, then a network petition will be required. If there’s a response in the cache, it’s returned back for the purposes of loading the page. If there’s a source found but it is not new, the browser may convert the request to a conditional revalidation petition, which contains an If-Modified-Since or even If-None-Match header that tells the server what version of the content the browser currently has in its cache.

It has to know where to proceed, before anything could happen in a browser. No matter the case, these all lead to what is called a navigation. As it kicks off a chain reaction of events which culminates in a web page being wealthy, A navigation is the very first step in any web interaction.
A service employee can be registered when a page is visited, a process that records the service employee registration and URL mapping to a database. Deciding if or not a service worker is installed is as simple as searching for the navigated URL in that database. If there exists a service worker for that URL, then it is going to be permitted to handle responding to the petition. In the case the site uses it, and that the new Navigation Preload attribute is available from the browser, the browser will also consult with the network for the first navigation request. This can be beneficial because it allows the browser to never block on a possibly slower service worker start up.


Initiating the request

When there’s a link for the host and port to the request, the link will be reused instead of establishing a new one. If not, the browser consults the media layer to know if it should perform a DNS (Domain Name System) lookup. This would involve looking through the local DNS cache (that can be saved on your own device), and, depending on the freshness of the cache, remote name servers might also be consulted (they could be hosted by Internet Service Providers), that will eventually lead to the correct IP address to the browser to connect to.

So that the server knows it’ll be equally sending to and receiving from the client, the browser is now able to establish a connection with the server.
As you know, the webpage will continue to create requests, because there are on the page which are significant for the general experience, including style sheets, JavaScript, and graphics. Furthermore, resources which are referenced within those sub-resources, such as background pictures (referenced in CSS) or alternative sources pioneered by fetch(), import(), or AJAX calls. We would just have a page. As you have seen in also the flowchart and both the explanation sooner is in part affected from the browser’s caching policies.

Assess for HSTS