<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Manmeet Singh</title>
    <description>The latest articles on DEV Community by Manmeet Singh (@thatsmanmeet).</description>
    <link>https://dev.to/thatsmanmeet</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3735834%2F909614d6-6e67-45fc-a1f9-b8851a8def38.png</url>
      <title>DEV Community: Manmeet Singh</title>
      <link>https://dev.to/thatsmanmeet</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thatsmanmeet"/>
    <language>en</language>
    <item>
      <title>React Native Fabric Rendering Explained</title>
      <dc:creator>Manmeet Singh</dc:creator>
      <pubDate>Thu, 12 Mar 2026 12:17:51 +0000</pubDate>
      <link>https://dev.to/thatsmanmeet/react-native-fabric-rendering-explained-4e9a</link>
      <guid>https://dev.to/thatsmanmeet/react-native-fabric-rendering-explained-4e9a</guid>
      <description>&lt;p&gt;In the previous article, we explored the legacy and new architecture of React Native, examining various components used in the new architecture. However, we did not delve deeply into the Fabric pipeline. Therefore, this article focuses on the Fabric Renderer and how React Native renders layouts.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Fabric Renderer
&lt;/h2&gt;

&lt;p&gt;Fabric is React Native's new rendering system that utilizes the JavaScript Interface (JSI) and the Yoga layout library to render the native UI on the target platform. Unlike the old rendering system, which relied on a large JSON dump and was asynchronous, the new Fabric system uses JSI to directly invoke C++ methods, allowing for synchronous updates to the native layout without any performance drop.&lt;/p&gt;

&lt;p&gt;Fabric rendering have multiple phases:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Render Phase&lt;/strong&gt;: React executes the code and create a React Element tree which is then uses C++ to translate it to a React shadow tree.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Commit Phase&lt;/strong&gt;: Yoga library uses the shadow tree and decided the exact mathematical coordinates of the components and decides the layout.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mount Phase&lt;/strong&gt;: Native side will render layout on the screen based on the information from the yoga tree&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's say you want to render a &lt;code&gt;&amp;lt;View&amp;gt;&lt;/code&gt; with a &lt;code&gt;&amp;lt;Text&amp;gt;&lt;/code&gt; component inside it as shown in the code example below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;HomePage&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
    &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;View&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Text&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Home&lt;/span&gt; &lt;span class="nx"&gt;Page&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Text&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/View&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Render Phase
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2bdrmvh0xw04z0g9d0t8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2bdrmvh0xw04z0g9d0t8.png" alt="Render Phase" width="800" height="634"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the Render phase, React executes the JavaScript logic, and for every React component, it creates a React Element tree. This is standard React behavior, while at the same time, the Fabric renderer steps in.&lt;/p&gt;

&lt;p&gt;The Fabric renderer utilizes C++ to synchronously generate a Shadow element for each React Host Component (such as View or Text) from the React Tree, thereby creating a Shadow Tree.&lt;/p&gt;

&lt;p&gt;The React Renderer establishes the same relationships among Shadow Node elements as React does among its multiple React Nodes, resulting in the creation of the &lt;strong&gt;React Shadow Tree.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As this step is performed synchronously using the JSI, there is no serialization overhead.&lt;/p&gt;

&lt;p&gt;Now, we have the blueprint of what to draw on the screen, but we don't know the exact location or size of these individual nodes, hence we proceed to the commit phase.&lt;/p&gt;

&lt;h3&gt;
  
  
  Commit Phase
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk88hxo4hg19768vh4123.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk88hxo4hg19768vh4123.png" alt="commit phase" width="800" height="658"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the Commit Phase, the exact coordinates of the Shadow Nodes to be displayed on the screen are calculated. This involves two asynchronous operations: &lt;strong&gt;Layout Calculation and Tree Promotion.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Layout Calculation:&lt;/strong&gt; During this step, the Renderer calls the Yoga Layout Library to determine the precise &lt;strong&gt;size (height and width)&lt;/strong&gt; and &lt;strong&gt;coordinates (X and Y)&lt;/strong&gt; for each shadow node in the React Shadow Tree. This layout calculation is primarily handled in C++, except in certain situations where component size or location must be computed on the host platform. In such cases, the Yoga library triggers a native function to perform these calculations on the native layer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tree Promotion:&lt;/strong&gt; Once the layout math has been completed, then this React Shadow Tree is promoted as the &lt;strong&gt;official&lt;/strong&gt; &lt;strong&gt;next tree&lt;/strong&gt;, as it has all the information ready to be painted on the screen.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Both of the above operations are asynchronous in nature and executes on the background thread.&lt;/p&gt;

&lt;p&gt;We have the blueprint, and we have the exact coordinates. The final step is to actually draw the native UI elements.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mount Phase
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6lz38glo9zkr9lo7la2a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6lz38glo9zkr9lo7la2a.png" alt="Mount Phase" width="800" height="671"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Mount phase, transforms the C++ React Shadow Tree into &lt;strong&gt;Host View Tree,&lt;/strong&gt; hence rendering the actual components on the screen.&lt;/p&gt;

&lt;p&gt;So the React code we originally had, which looked like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;View&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Text&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;HomePage&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Text&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/View&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;will be converted to its respective container called as &lt;strong&gt;Host View&lt;/strong&gt; for each component and is then mounted on the screen.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Android&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For Android, the &lt;code&gt;View&lt;/code&gt; component will be converted to &lt;code&gt;android.view.viewGroup&lt;/code&gt; and the &lt;code&gt;Text&lt;/code&gt; component will be converted to &lt;code&gt;android.widget.TextView&lt;/code&gt; and populates the text "HomePage" inside it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;iOS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For iOS, the &lt;code&gt;View&lt;/code&gt; component will be converted to &lt;code&gt;UIView&lt;/code&gt; and the &lt;code&gt;Text&lt;/code&gt; component will be converted to &lt;code&gt;UITextView&lt;/code&gt; and populates the text "HomePage" inside it with the help of &lt;code&gt;NSLayoutManager&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now the &lt;strong&gt;Mount Phase,&lt;/strong&gt; itself consist of three different operations.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Tree Diffing:&lt;/strong&gt; The C++ engine calculates the fundamental differences between the previously rendered tree and the new one. This process identifies minor changes, such as a background color alteration, to be applied to the UI, and then produces a list of necessary operations*&lt;em&gt;.&lt;/em&gt;*&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Note:&lt;/strong&gt; If it's the initial render, the "previously rendered tree" is empty, so the resulting list will only include operations related to creating the views, setting properties, and so on.&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tree Promotion:&lt;/strong&gt; The "next tree" officially becomes the "rendered tree". This can be used for further comparison in tree diffing in case of any state updates.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;View Mounting:&lt;/strong&gt; The calculated changes are applied to the native host views. This happens synchronously on the main UI thread.&lt;/p&gt;&lt;/li&gt;

&lt;/ol&gt;

&lt;p&gt;The operations are synchronously executed on UI thread. If the commit phase executes on background thread, the mounting phase is scheduled for the next “tick” of UI thread. On the other hand, if the commit phase executes on UI thread, mounting phase executes synchronously on the same thread.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fys8h9q5acu7ptqyvas01.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fys8h9q5acu7ptqyvas01.png" alt="Fabric complete rendering" width="800" height="189"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above diagram shows the complete process of Fabric Rendering in React Native.&lt;/p&gt;

&lt;h4&gt;
  
  
  What Happens When State Changes?
&lt;/h4&gt;

&lt;p&gt;Let's say a user taps a button and changes a background color from red to yellow. How does Fabric handle this without rebuilding everything?&lt;/p&gt;

&lt;p&gt;React enforces immutability. To ensure thread safety, the React Shadow Tree cannot be mutated directly. Instead, React creates a &lt;em&gt;new&lt;/em&gt; tree. But doing this from scratch every time would be a performance nightmare.&lt;/p&gt;

&lt;p&gt;To solve this, Fabric uses &lt;strong&gt;Structural Sharing&lt;/strong&gt;. When your state updates, React only clones the specific nodes that were affected by the change, plus their direct path up to the root. All the other unchanged components are simply &lt;em&gt;shared&lt;/em&gt; between the old tree and the new tree. This drastically reduces memory consumption and makes state updates incredibly fast.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;And there you go! Now you understand how React Native's new rendering system, "Fabric," works. Since we already covered the old and new architecture, you now have a solid foundation in the fundamentals of React Native.&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>architecture</category>
      <category>programming</category>
      <category>react</category>
    </item>
    <item>
      <title>React Native Architecture Explained</title>
      <dc:creator>Manmeet Singh</dc:creator>
      <pubDate>Wed, 25 Feb 2026 04:42:41 +0000</pubDate>
      <link>https://dev.to/thatsmanmeet/react-native-explained-from-the-legacy-bridge-to-the-new-architecture-309b</link>
      <guid>https://dev.to/thatsmanmeet/react-native-explained-from-the-legacy-bridge-to-the-new-architecture-309b</guid>
      <description>&lt;p&gt;If you’ve been doing web development for a while, chances are you rely on React to build your frontends. You ship a solid web app. It works well. Users like it and you realise it needs a mobile app. &lt;/p&gt;

&lt;p&gt;You start researching and hit a wall, you need Kotlin for Android and Swift for iOS. You start questioning yourself: Do I really need to learn two separate languages? Master completely different tooling? Maintain two isolated codebases?&lt;/p&gt;

&lt;p&gt;It sounds like an absolute nightmare. But just as you're about to give up, you stumble into the territory of cross-platform development and discover React Native. It’s a framework that lets you write mobile apps using JavaScript and React, tools you already know and with a single codebase that targets both Android and iOS natively.&lt;/p&gt;

&lt;p&gt;Suddenly, building mobile apps doesn’t feel like starting from zero. It feels like an extension of what you already know. In this article, we are going to tear down React Native and understand exactly how its architecture works.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is React Native
&lt;/h2&gt;

&lt;p&gt;React Native is an open-source framework that allows developer to build native mobile applications for multiple platforms (Android, iOS, Mac, Windows) using JavaScript programming language and React library.&lt;/p&gt;

&lt;p&gt;Unlike hybrid frameworks that render inside a WebView (essentially embedding a browser inside a mobile app), React Native renders real, platform-specific native components.&lt;/p&gt;

&lt;p&gt;Let's take this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;View&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Text&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Hello&lt;/span&gt; &lt;span class="nx"&gt;World&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Text&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/View&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above code does not translate into the HTML. Rather it's actually converted into the Native component of the specified platforms.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;View&lt;/code&gt; will get converted to the &lt;code&gt;ViewGroup&lt;/code&gt; component on Android and &lt;code&gt;UIView&lt;/code&gt; on iOS, which are just native components, which acts as the layout containers, holding other components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Text&lt;/code&gt; will get converted to the &lt;code&gt;TextView&lt;/code&gt; component on Android and &lt;code&gt;UITextView&lt;/code&gt; on iOS, which are again the native components, used to render the text on the screens.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They are the same building blocks you would use if you were writing the app directly in Kotlin or Swift. This means apps feel more like they belong on the device they're running on, offering a smoother and more responsive user experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  How React Adapts to Web and Mobile
&lt;/h2&gt;

&lt;p&gt;You might wonder how React, commonly used to build website front-ends, can also render native components for mobile operating systems. Is it really the same React used for the web?&lt;/p&gt;

&lt;p&gt;Yes and no. The core React library is consistent across both web and mobile ecosystems, but the difference lies in how components are rendered.&lt;/p&gt;

&lt;p&gt;Have a look at the diagram below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo3ov0nzmfay1py613igc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo3ov0nzmfay1py613igc.png" alt="React Render different" width="800" height="516"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To understand React Native, you need to understand a surprising truth i.e . React doesn't know how to render an UI on the Screen.&lt;/p&gt;

&lt;p&gt;Look at the diagram above. At the very top sits the React Library. This is the brain of the operation. The function of the core react library is to manage the state using hooks such as &lt;code&gt;useState&lt;/code&gt; and &lt;code&gt;useEffect&lt;/code&gt; and calculates which part of the UI needs to be updated based on data changes using a process called Reconciliation. React library itself doesn't know what a HTML &lt;code&gt;div&lt;/code&gt; is or what an android &lt;code&gt;ViewGroup&lt;/code&gt; is.&lt;/p&gt;

&lt;p&gt;That job of rendering the UI is done by the Renderer.&lt;/p&gt;

&lt;p&gt;This architecture is what allows React to exist anywhere. You keep the same React Core at the top, but you swap out the Renderer depending on which platform you are targeting.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;React-DOM Renderer&lt;/strong&gt;: When building for the web, we use a renderer called &lt;code&gt;react-dom&lt;/code&gt;. Since browsers natively understand JavaScript, the process is straightforward and synchronous in nature. The &lt;code&gt;react-dom&lt;/code&gt; takes the blueprint from the react core and directly manipulates the DOM on the browser.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;React-Native Renderer&lt;/strong&gt;: Since Mobile platforms like Android &amp;amp; iOS doesn't understand the JavaScript natively, we require a different renderer known as &lt;code&gt;react-native&lt;/code&gt; which takes the blueprint from react core and send it across the &lt;code&gt;JS Bridge (old arch)&lt;/code&gt; asynchronously, which tells the mobile OS, to render the native component with specific properties (like color, size etc).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;React does not render anything by itself. The renderer determines whether your components become DOM nodes or native UI views.&lt;/p&gt;

&lt;p&gt;Now, we have a solid introduction of React Native, it's time to go behind the scenes with the architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  JS Bridge Architecture
&lt;/h2&gt;

&lt;p&gt;The Bridge Architecture, also known as the Legacy Architecture, was how React Native applications originally worked. This was the default architecture before React Native v0.76.&lt;/p&gt;

&lt;p&gt;Let's understand how the old architecture used to work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvr9isjlhnwok66vd78yp.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvr9isjlhnwok66vd78yp.jpeg" alt="React Native Old Architecture" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Phase 1: Build Time (The Setup)
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;In the build phase, all the JavaScript code, react components, assets are taken from our codebase and are bundled into a single optimised file known as JS Bundle using the Metro Bundler.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This static bundle is the blueprint of your entire application and is embedded with your application during the build time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once the app is installed, Metro is no longer involved. Everything from this point forward happens at runtime.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Phase 2: Run Time (The Execution)
&lt;/h3&gt;

&lt;p&gt;When the user taps on your app, three different threads are fired for execution of our app:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;JavaScript Thread&lt;/strong&gt;: The &lt;strong&gt;JavaScript Engine (JSC)&lt;/strong&gt; would boot up and start executing the &lt;strong&gt;JS Bundle&lt;/strong&gt; which is embedded in our app. This is where our JavaScript code will be executed and holds all the react logic, state and performs the API calls as well to fetch the data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;UI Thread&lt;/strong&gt;: The UI thread will spawn on your mobile OS, which will allow it to paint the initial UI of the app for the interaction based on the instructions it received.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Shadow Thread&lt;/strong&gt;: This thread will be used by the &lt;strong&gt;Yoga Library&lt;/strong&gt;, that will calculate the entire layout of the app and provides the instructions to the UI Thread on how to render the layout.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Phase 3: Execution Phase
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Whenever a user taps on the button, let's say this button will change the colour of the background, then firstly the UI Thread will capture the Tap event on the button.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Since the Native UI cannot execute a JavaScript function directly, it will serialize the touch event into a JSON and will send this even to the &lt;strong&gt;asynchronous bridge.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The JS Bridge will sent this information to the JavaScript engine (JSC), which will deserialize the JSON, process the JavaScript code, let's say update the state using &lt;code&gt;useState&lt;/code&gt; and React calculates the new UI based on the changes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The JS Thread now serializes these instructions in the JSON format and will again send it to the asynchronous bridge.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Shadow Thread will receive this JSON, and the Yoga library will read these instructions and will calculate exact coordinates and properties of the element and will pass it to the UI Thread to finally paint the updated screen.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Limitations of the Asynchronous Bridge
&lt;/h3&gt;

&lt;p&gt;There were a few limitations of the asynchronous bridge but the biggest ones were &lt;strong&gt;the bridge and the JSON&lt;/strong&gt;, as you can see from the diagram above.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Serialization Bottleneck:&lt;/strong&gt; Since mobile platforms and JavaScript cannot directly communicate, they rely on JSON for interaction. Stringifying and parsing JSON costs CPU cycles. This serialization and deserialization process through the asynchronous bridge introduces significant latency, and handling a large number of events can lead to lag and frame drops on the native side.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Asynchronous Bridge&lt;/strong&gt;: The serialization and deserialization process isn't inherently problematic, but the issue arose from relying on a single asynchronous bridge. Because JavaScript cannot directly interact with the native side to modify the UI, each event must pass through the entire message-passing phase on the bridge. With a large volume of JSON messages, the bridge often becomes congested, leading to frame drops, laggy animations, and the notorious blank white screens when rendering lists.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Single JavaScript Thread&lt;/strong&gt;: All code processing must occur on the JavaScript Thread. Although there are separate threads, such as UI Threads, the majority of application logic is managed by the JavaScript thread. Consequently, intensive computations can block this thread, leading to noticeable performance declines across the entire app.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Since, React Native doesn't block the Main Thread, that's why everything needs to be done in asynchronous way. Hence every event becomes a promise/callback.&lt;/p&gt;

&lt;h2&gt;
  
  
  New Architecture
&lt;/h2&gt;

&lt;p&gt;The React Native core team soon understood that optimizing the JSON Bridge wouldn't lead to the desired performance improvements. Therefore, they chose to eliminate the asynchronous JS Bridge altogether.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbr0k73l6vfwy6ygcszdw.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbr0k73l6vfwy6ygcszdw.jpeg" alt="React Native New Architecture" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The bridge has now been replaced with the JavaScript Interface (JSI), featuring C++ bindings that directly call the native API of mobile platforms, bypassing the serialization/deserialization and message-passing process. This enhances the overall app performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hermes Engine
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Hermes Engine is an open source JavaScript engine created by Meta for improving the performance of the React Native apps.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It is heavily optimized for the React Native and uses JSI to directly communicate with the native platforms using Native APIs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It provides other benefits like Improved time to interactive (TTI), smaller app bundle size and reduced memory consumption.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It replaced the old JSC and became the default for React native apps starting from version 0.70 of RN.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  JavaScript Interface (JSI)
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;JavaScript Interface (JSI) is the new lightweight C++ layer that allows the JavaScript to directly communicate with the Native code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSI replaced the old legacy bridge architecture which means that no message passing or asynchronous operations are required.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSI allows JavaScript to hold the references to C++ host objects and invoke methods directly on them in a synchronous manner.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyime9s1hh8ls58vppri3.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyime9s1hh8ls58vppri3.jpeg" alt="JSI Bridge" width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because of JSI, JavaScript can now hold direct references to C++ Host Objects e.g. &lt;code&gt;nativeObjectRef&lt;/code&gt;. When JavaScript calls &lt;code&gt;nativeObjectRef.setProperty()&lt;/code&gt;, it isn't sending a JSON message to a queue; it is &lt;strong&gt;synchronously&lt;/strong&gt; invoking a method on the C++ object located in the native side.&lt;/p&gt;

&lt;h3&gt;
  
  
  Turbo Modules
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;In legacy architecture, if you need to use some native functionality such as Bluetooth, camera etc, then those native modules were loaded eagerly, on the startup and stayed loaded in the memory in case they were needed later.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Due to these reasons, in legacy architecture the native modules would take more time to load, significantly increase the memory footprint and makes the app slow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;However with introduction to Turbo Modules in the new architecture, now these modules are lazily loaded.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;As turbo modules are loaded only when they are required, this allowed to reduce the memory footprint and also enhances the performance a lot.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Fabric System
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Fabric is the new rendering system which utilizes the JSI and Yoga library to manage the UI on the native side.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the legacy architecture, if JavaScript wanted to render a massive list, it had to serialize a huge JSON payload, dump it into the queue, and hope the UI thread wouldn't drop frames. It was asynchronous in nature.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;With Fabric, JavaScript uses JSI to directly invoke the C++ methods that create and update the native views (like UIView on iOS or ViewGroup on Android) synchronously.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Fabric render pipeline have multiple phases:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Render Phase: React executed the code and create a React Element tree which is then uses C++ to translate it to a React shadow tree.&lt;/li&gt;
&lt;li&gt;Commit Phase: Yoga library uses the shadow tree and decided the exact mathematical coordinates of the components and decides the layout.&lt;/li&gt;
&lt;li&gt;Mount Phase: Native side will render layout on the screen based on the information from the yoga tree&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;/ol&gt;

&lt;p&gt;In this article, I am not going into the workings of the Fabric, but may create a separate article in future for this.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;At this point, you have a solid understanding of what React Native is and exactly how it operates under the hood.&lt;/p&gt;

&lt;p&gt;We've explored how the Legacy Architecture functioned, why the asynchronous JSON Bridge became a major performance bottleneck, and how the React Native core team solved it by rewriting the engine with C++ and JSI.&lt;/p&gt;

&lt;p&gt;What are you waiting for? Go build that app!&lt;/p&gt;

</description>
      <category>react</category>
      <category>reactnative</category>
      <category>mobile</category>
      <category>architecture</category>
    </item>
    <item>
      <title>A Beginners Guide to DNS Resolution</title>
      <dc:creator>Manmeet Singh</dc:creator>
      <pubDate>Thu, 05 Feb 2026 18:24:44 +0000</pubDate>
      <link>https://dev.to/thatsmanmeet/a-beginners-guide-to-dns-resolution-3b45</link>
      <guid>https://dev.to/thatsmanmeet/a-beginners-guide-to-dns-resolution-3b45</guid>
      <description>&lt;p&gt;Whenever you try to open a website, like "google.com," what do you think happens behind the scenes? How does your browser know which server to get data from among millions of servers worldwide? Is it magic? Well, No! It happens with the help of a system known as DNS.&lt;/p&gt;

&lt;p&gt;Before we understand this complex system, let’s understand the working of DNS with the help of an Analogy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Phonebook Analogy
&lt;/h2&gt;

&lt;p&gt;Our smartphones have an app named &lt;strong&gt;Contacts,&lt;/strong&gt; which stores all the phone numbers of our friends, family and other people whom we meet in our life.&lt;/p&gt;

&lt;p&gt;Let me ask you this question; &lt;strong&gt;Do you remember the phone numbers of all people stored on your mobile?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5lyoeiwieta94ri1gkq3.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5lyoeiwieta94ri1gkq3.webp" alt="Phone Book" width="800" height="512"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most likely, your answer would be no (unless you're a genius or very lonely)! Generally, you might only remember a few phone numbers of your close ones, like your parents. However, you do remember most people's names, and when you need to call them, you open your phone app, search for the person's name, and click the call button. Your phone then automatically dials the number for you.&lt;/p&gt;

&lt;p&gt;You see, we humans are not great at remembering numbers, but we are excellent at remembering names. So, we use our contacts app to save a person's name and phone number once, and then our phone app does all the hard work for us.&lt;/p&gt;

&lt;p&gt;Just like people have name and phone numbers, the websites have &lt;strong&gt;Domain Name&lt;/strong&gt; and &lt;strong&gt;IP Addresses&lt;/strong&gt; and we really remember websites names like &lt;strong&gt;Google, Instagram, Reddit&lt;/strong&gt; but not their IP Addresses.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Entity&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Number / IP Address&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Person&lt;/td&gt;
&lt;td&gt;John Doe&lt;/td&gt;
&lt;td&gt;+1034024234&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Website&lt;/td&gt;
&lt;td&gt;Google.com&lt;/td&gt;
&lt;td&gt;
&lt;a href="http://172.217.19.164/" rel="noopener noreferrer"&gt;172.217.19.164&lt;/a&gt; (Real IP btw)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;DNS&lt;/strong&gt; acts like the internet's phonebook. It converts a &lt;strong&gt;Domain Name&lt;/strong&gt; (e.g., Google.com) to its corresponding &lt;strong&gt;IP Address&lt;/strong&gt; (e.g., 172.217.19.164).&lt;/p&gt;

&lt;p&gt;Just as we rely on our contacts app to convert a name into a phone number, a web browser like Chrome relies on DNS to convert a domain name into an IP address.&lt;/p&gt;

&lt;p&gt;However, your phonebook is probably small with maybe about 500 to 1,000 entries max. But there are millions of websites on the internet. Do you think a single phonebook could handle it all?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Well, No.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It’s not just one massive server; it’s actually many different systems working together. We call this a &lt;strong&gt;Decentralised System&lt;/strong&gt;."&lt;/p&gt;

&lt;h2&gt;
  
  
  What is DNS
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Domain Name System (DNS)&lt;/strong&gt; is a hierarchal and distributed naming system that converts the human readable domain names into their respective IP addresses which are used by the client such as web browser to access those websites.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvtpn3snywjedpnt88rmd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvtpn3snywjedpnt88rmd.png" alt="High Level DNS" width="800" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the diagram above, the DNS system is shown as a single component for simplicity, but it actually consists of multiple different components.&lt;/p&gt;

&lt;h2&gt;
  
  
  Components of DNS System
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Recursive Resolver:&lt;/strong&gt; Recursive Resolver is the server that is provided by your Internet Service Provider (ISP) and is the main bridge between your System and the other DNS servers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The name &lt;code&gt;Recursive&lt;/code&gt; comes from the fact that it makes request to multiple DNS servers in order to get the IP address of the final server. It is also the initial point of contact between client and the global DNS system.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Root Servers:&lt;/strong&gt; Root Servers provide the IP Address of the servers which contains the records of the top level domains (like .com or .net) and share them with the Resolver.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There are technically only &lt;strong&gt;13 Root Server IP addresses&lt;/strong&gt; in the world. However, don't worry about them crashing—there are actually &lt;strong&gt;1,600+ physical servers&lt;/strong&gt; worldwide using "Anycast" technology to share those 13 IPs. It’s a massive, distributed safety net.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Top Level Domains:&lt;/strong&gt; These servers have domain specific and only contains the IP address for the domains that correspond to the specific TLD (e.g .com). This server provides the IP of the Authoritative Servers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;TLD are also of different types such as &lt;strong&gt;Country Specific (.jp, .in, .ca etc) and Generic (.com, .org, .net etc)&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Authoritative Server:&lt;/strong&gt; These are the servers which holds the actual IP address of the website, you’re trying to visit.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There’s a common misconception that Authoritative servers are the final servers where the website is hosted. &lt;strong&gt;However, this Idea is wrong!&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;When you buy a domain (from GoDaddy, Namecheap, etc.), they usually provide this server by default. However, as developers, we often configure this to point to a custom provider like &lt;strong&gt;Cloudflare&lt;/strong&gt; or &lt;strong&gt;AWS Route53&lt;/strong&gt; for better speed and security.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  DNS Resolution Process
&lt;/h2&gt;

&lt;p&gt;Now, let's understand how your web browser loads websites using a process called DNS Resolution.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyg46pqcxypvuetqude6q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyg46pqcxypvuetqude6q.png" alt="DNS Resolution Process" width="800" height="538"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A user opens the web browser, types the URL (e.g., &lt;a href="https://google.com" rel="noopener noreferrer"&gt;https://google.com&lt;/a&gt;), and presses enter.&lt;/li&gt;
&lt;li&gt;The browser will try to find the website's IP address in its local cache. If it finds the IP address, it will load the website, and the rest of the DNS resolution process is skipped.&lt;/li&gt;
&lt;li&gt;If the IP address of the website is not found, the DNS query is sent to the Recursive Resolver.&lt;/li&gt;
&lt;li&gt;The Recursive Resolver will also check its cache to see if the IP address is available. If it is, the resolver will return the response to the browser, and the rest of the DNS resolution process will be skipped.&lt;/li&gt;
&lt;li&gt;If the IP address of the website is not found in the Recursive Resolver’s cache, the request is sent to the Root Servers.&lt;/li&gt;
&lt;li&gt;Root Servers check the top-level domain in the URL (like google.com) and provide the IP address of the Top Level Domain Server for &lt;code&gt;.com&lt;/code&gt; domains to the Recursive Resolver.&lt;/li&gt;
&lt;li&gt;The Recursive Resolver then sends the request to the Top Level Domain Server, which checks the registrar currently handling the website and returns the IP address of the Authoritative Server to the Recursive Resolver.&lt;/li&gt;
&lt;li&gt;The Recursive Resolver sends the request to the Authoritative Servers, which provide the actual IP address of the website server (in this case, Google’s server) to the Recursive Resolver.&lt;/li&gt;
&lt;li&gt;The Recursive Resolver returns the response to the browser.&lt;/li&gt;
&lt;li&gt;The browser then sends the request directly to the website’s server using the IP address provided by the Recursive Resolver and retrieves the data from the website.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Time To Live (TTL)
&lt;/h2&gt;

&lt;p&gt;So far, we have learned the 10-step DNS resolution process. But now, a question might be popping up in your head: &lt;em&gt;“*&lt;strong&gt;*Does this long, complex process happen for every single resource?**&lt;/strong&gt;”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Think about it for a second!&lt;/p&gt;

&lt;p&gt;Let’s say you have a slow internet connection. The DNS resolution itself takes about 2 to 3 seconds, and finally, the webpage loads. However, a modern webpage isn't just one file. It has images, scripts, fonts, and videos. If that page has 10 images, and your browser had to perform a full DNS resolution for &lt;em&gt;every single one&lt;/em&gt;, that would be an extra 10 lookups. At 3 seconds per lookup, you are looking at a 30-second delay just to find the images!&lt;/p&gt;

&lt;p&gt;In the world of modern web development (React, heavy JavaScript, rich media), this would be a disaster. The web would be unusable.&lt;/p&gt;

&lt;p&gt;So what’s the fix? Well, one word &lt;strong&gt;Caching.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Remember, in the DNS resolution step, both the browser and the recursive resolver have a cache, which helps the browser avoid repeating the entire DNS resolution process.&lt;/p&gt;

&lt;p&gt;Great, so the browser doesn't need to make requests repeatedly to get the IP address for images and other resources. But who tells the browser when to check the cache again?&lt;/p&gt;

&lt;p&gt;Imagine your browser cached a website, and then a developer switched to another server a minute later. If the browser never checks with the recursive resolver again, how would it know the website's IP address has changed?&lt;/p&gt;

&lt;p&gt;This is where the concept of Time To Live (TTL) comes into play.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TTL&lt;/strong&gt; is a setting attached to the DNS record (configured by the domain owner). It tells the resolver exactly how long to keep the data valid.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;High TTL :&lt;/strong&gt; This is good for the websites, that are stable and don’t change as often. High TTL could be like 24 hours of time is beneficial for such websites.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low TTL :&lt;/strong&gt; This is good for the websites, that are change regularly. Low TTL could be like 5 minutes of time is beneficial for such websites.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Essentially, TTL is the &lt;strong&gt;expiration date&lt;/strong&gt; on the data. It ensures your browser remains fast by not making too many request to DNS servers but at the same time doesn’t keep serving the Stale data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dig Command
&lt;/h2&gt;

&lt;p&gt;So far, we just learned about the theory. Shall we try seeing this in practice?&lt;/p&gt;

&lt;p&gt;We can achieve this using the &lt;code&gt;dig&lt;/code&gt; (Domain Information Groper) command. It’s a standard tool for developers to query DNS servers directly and see exactly what is happening under the hood.&lt;/p&gt;

&lt;p&gt;Open your terminal and type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;dig&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;google.com&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just take a look at the output below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&amp;lt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;DiG&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;9.10.6&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&amp;lt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;google.com&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;global&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;options:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;cmd&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Got&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;answer:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;HEADER&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;opcode:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;QUERY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;status:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;NOERROR&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;id:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;22386&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;flags:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;qr&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;rd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ra&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;QUERY:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ANSWER:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;AUTHORITY:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ADDITIONAL:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;1&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;OPT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;PSEUDOSECTION:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;EDNS:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;version:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;flags:&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;udp:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;1280&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;QUESTION&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SECTION:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;google.com.&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;A&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ANSWER&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SECTION:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;google.com.&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nx"&gt;280&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;A&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="nx"&gt;142.250.182.206&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Query&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;time:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;20&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;msec&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;SERVER:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;2405:201:5500:6193::c0a8:1d01&lt;/span&gt;&lt;span class="c"&gt;#53(2405:201:5500:6193::c0a8:1d01)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;WHEN:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Sat&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Jan&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;24&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;16:50:36&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;IST&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;2026&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MSG&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SIZE&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;rcvd:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;55&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output might look like a wall of text, but let's decode the three most important parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Question Section: Contains the query that we sent, In our case to get the IP of google.com&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Answer Section: Contains the information about the response we received. This includes information like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Domain Name: google.com&lt;/li&gt;
&lt;li&gt;Time to Live (TTL): 280 seconds&lt;/li&gt;
&lt;li&gt;DNS Record Type : A record&lt;/li&gt;
&lt;li&gt;IP Address : 142.250.182.206&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Additional information: This contains some additional information about the Query such as:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Query time: It took 20 milliseconds for this query to return response.&lt;/li&gt;
&lt;li&gt;Server: This is most likely our Recursive Resolver&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;/ol&gt;

&lt;h3&gt;
  
  
  Seeing the full DNS Resolution using the Dig command
&lt;/h3&gt;

&lt;p&gt;Now with all the knowledge equipped about the DNS and how the Dig command shows the results, are you ready to see full DNS Resolution in action?&lt;/p&gt;

&lt;p&gt;Let’s run the dig command with &lt;code&gt;+trace&lt;/code&gt; flag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;dig&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;google.com&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;trace&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just take a look at the output below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;~/&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;dig&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;google.com&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;trace&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&amp;lt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;DiG&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;9.10.6&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&amp;lt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;google.com&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;trace&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;global&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;options:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;cmd&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="mi"&gt;86363&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="kr"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;a.root-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="mi"&gt;86363&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="kr"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;b.root-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="mi"&gt;86363&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="kr"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;c.root-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="mi"&gt;86363&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="kr"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;d.root-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="mi"&gt;86363&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="kr"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;e.root-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="mi"&gt;86363&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="kr"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;f.root-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="mi"&gt;86363&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="kr"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;g.root-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="mi"&gt;86363&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="kr"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;h.root-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="mi"&gt;86363&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="kr"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;i.root-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="mi"&gt;86363&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="kr"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;j.root-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="mi"&gt;86363&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="kr"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;k.root-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="mi"&gt;86363&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="kr"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;l.root-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="mi"&gt;86363&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="kr"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;m.root-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Received&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;239&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;bytes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;127.0.2.2&lt;/span&gt;&lt;span class="c"&gt;#53(127.0.2.2) in 1 ms&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="n"&gt;com.&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;h.gtld-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;com.&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;g.gtld-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;com.&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;k.gtld-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;com.&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;c.gtld-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;com.&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;j.gtld-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;com.&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;b.gtld-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;com.&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;e.gtld-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;com.&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;m.gtld-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;com.&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;d.gtld-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;com.&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;i.gtld-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;com.&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;a.gtld-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;com.&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;f.gtld-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;com.&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;l.gtld-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;com.&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;86400&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;DS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;19718&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;2&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;8ACBB0CD28F41250A80A491389424D341522D946B0DA0C0291F2D3D7&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;71D7805A&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;com.&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;86400&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;RRSIG&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="nx"&gt;DS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;8&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;86400&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;20260206050000&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;20260124040000&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;21831&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;E/ZKdBG6pUCuQGB0jkM1cndavlviGO62WgLfbmQPNEz/YY7sufjwe8Jp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pQA3VU9dgd46/E&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;90p9q8LnK1pdGm7k0RJlA&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;XuvenHdXVbX&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;jzZn&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;N5&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;p0&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;fEsbociE7ot1/JmwKacwPPPKtnrep8iRELxXHU20BA4J/0sp3z9ht&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;8&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;2WgDoaQlKb04JQf5eS0J1hJ&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;mAELQbQKwWXxX8yaisSObq9axWIAKE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;NHUv4PO82pBf3BMwLLdZhzlfVoX/ObjcDoTm6yhHkhavB9hNOil8o6kA&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;gg0MMcsbJqEGBrgVT1pKn9pDabUR949GFL8Qo1eHm270Dp72F8E&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;tfE9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ud4Nyw&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Received&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;1170&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;bytes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;193.0.14.129&lt;/span&gt;&lt;span class="c"&gt;#53(k.root-servers.net) in 36 ms&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="n"&gt;google.com.&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;ns2.google.com.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;google.com.&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;ns1.google.com.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;google.com.&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;ns3.google.com.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;google.com.&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;ns4.google.com.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;CK0POJMG874LJREF7EFN8430QVIT8BSM.com.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;900&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;NSEC3&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;CK0Q3UDG8CEKKAE7RUKPGCT1DVSSH8LL&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SOA&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;RRSIG&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;DNSKEY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;NSEC3PARAM&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;CK0POJMG874LJREF7EFN8430QVIT8BSM.com.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;900&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;RRSIG&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;NSEC3&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;2&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;900&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;20260130002721&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;20260122231721&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;35511&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;com.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;FRwJDTYcGgEr&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;lzbONMVnFNDkoYtjSmaKNF0x&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;q4JR&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;sD&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;rwZDoaYn/D&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;rPkDTs5F1BwixFGXqZQizSc7cFjkdw&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;S84BOR4DK28HNHPLC218O483VOOOD5D8.com.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;900&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;NSEC3&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;S84BR9CIB2A20L3ETR1M2415ENPP99L8&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;DS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;RRSIG&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;S84BOR4DK28HNHPLC218O483VOOOD5D8.com.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;900&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;RRSIG&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;NSEC3&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;2&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;900&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;20260131013349&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;20260124002349&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;35511&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;com.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;uW9ufLSEVTnIol0z4l&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;DX8pBSOvPIVaJSeFV8EE7cYJOgu44vzXw0rus&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;XnZN3Zj/y6mjTGmDpGd4QHBnIevvYg&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Received&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;644&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;bytes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;192.54.112.30&lt;/span&gt;&lt;span class="c"&gt;#53(h.gtld-servers.net) in 352 ms&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="n"&gt;google.com.&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nx"&gt;300&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;A&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="nx"&gt;142.250.182.46&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Received&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;55&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;bytes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;216.239.36.10&lt;/span&gt;&lt;span class="c"&gt;#53(ns3.google.com) in 26 ms&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's look at the actual output and decode the journey.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: The Root Check (&lt;/strong&gt;&lt;code&gt;.&lt;/code&gt;)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.           86363   IN  NS  a.root-servers.net.
.           86363   IN  NS  b.root-servers.net.
...
;; Received 239 bytes from 127.0.2.2#53(127.0.2.2) in 1 ms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;It first queries the &lt;strong&gt;Root Servers&lt;/strong&gt; and picked one of the random servers from the 13 root servers and get’s the IP of TLD server and proceeds to step 2.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 2: The TLD Check (&lt;/strong&gt;&lt;code&gt;com.&lt;/code&gt;)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;com.&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;h.gtld-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;com.&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;g.gtld-servers.net.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Received&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;1170&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;bytes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;193.0.14.129&lt;/span&gt;&lt;span class="c"&gt;#53(k.root-servers.net) in 36 ms&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now our computer asked the TLD server &lt;a href="http://k.root-servers.net" rel="noopener noreferrer"&gt;&lt;code&gt;k.root-servers.net&lt;/code&gt;&lt;/a&gt;, about the IP of google.com. However it responded with IP of the Authoritative Server.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 3: The Authoritative Check (&lt;/strong&gt;&lt;a href="http://google.com" rel="noopener noreferrer"&gt;&lt;code&gt;google.com&lt;/code&gt;&lt;/a&gt;&lt;code&gt;.&lt;/code&gt;)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;google.com.&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;ns2.google.com.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;google.com.&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nx"&gt;172800&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;NS&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;ns1.google.com.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Received&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;644&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;bytes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;192.54.112.30&lt;/span&gt;&lt;span class="c"&gt;#53(h.gtld-servers.net) in 352 ms&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now our computer asked the Authoritative Server &lt;a href="http://h.gtld-servers.net" rel="noopener noreferrer"&gt;&lt;code&gt;h.gtld-servers.net&lt;/code&gt;&lt;/a&gt;, about the IP of google.com. It responded with &lt;code&gt;NS ns2.google.com&lt;/code&gt;, telling us to ask the IP from google servers directly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 4: The Final Answer&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;google.com.&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nx"&gt;300&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;IN&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;A&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="nx"&gt;142.250.182.46&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Received&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;55&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;bytes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;216.239.36.10&lt;/span&gt;&lt;span class="c"&gt;#53(ns3.google.com) in 26 ms&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Our computer sent a request to &lt;a href="http://ns3.google.com" rel="noopener noreferrer"&gt;&lt;code&gt;ns3.google.com&lt;/code&gt;&lt;/a&gt; which gave us the final IP: &lt;code&gt;142.250.182.46&lt;/code&gt; and we can now open google.com on our system.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp3dj2kpefb7hhkjwon9h.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp3dj2kpefb7hhkjwon9h.gif" alt="Absolute Cinema Meme" width="426" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;If you've followed along this far in the blog, congratulations! You now understand that DNS is not magic but a complex system that required a lot of engineering to get to where it is today.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>networking</category>
      <category>dns</category>
      <category>webdev</category>
    </item>
    <item>
      <title>CURL Command Explained</title>
      <dc:creator>Manmeet Singh</dc:creator>
      <pubDate>Thu, 05 Feb 2026 18:19:33 +0000</pubDate>
      <link>https://dev.to/thatsmanmeet/curl-command-explained-37bk</link>
      <guid>https://dev.to/thatsmanmeet/curl-command-explained-37bk</guid>
      <description>&lt;p&gt;In today's world, we mostly use &lt;strong&gt;Client-Server Architecture&lt;/strong&gt;, which means multiple clients connect to a centralized server. Of course, there can be multiple servers and distributed systems too, but to understand the Curl command, we'll focus on one client and one server.&lt;/p&gt;

&lt;p&gt;Before we dive into the cURL command and how it works, let's first understand the &lt;strong&gt;client-server&lt;/strong&gt; architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Server?
&lt;/h2&gt;

&lt;p&gt;A server is a computer system that is always connected to the Internet, listening for incoming requests, and providing appropriate responses.&lt;/p&gt;

&lt;p&gt;There are different types of servers, such as application servers, database servers, and mail servers.&lt;/p&gt;

&lt;p&gt;Servers play a crucial role in the client-server architecture by ensuring that clients receive the necessary data and services they request. Understanding how servers work helps us use tools like cURL more effectively to interact with these systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Client?
&lt;/h2&gt;

&lt;p&gt;A client is anything a user controls, from a web browser to a terminal, that can send requests to a server and receive responses to display to the user.&lt;/p&gt;

&lt;p&gt;A client can be a web browser like Chrome or Firefox, an API testing tool like Postman or Bruno, or terminal software like cURL.&lt;/p&gt;

&lt;h2&gt;
  
  
  Client-Server Architecture
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftith1wrop943uk0geag3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftith1wrop943uk0geag3.png" alt="Client Server Architecture" width="800" height="513"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Client Server Architecture simply says that a client will send a request using REST API (or any other API) to the server, the server will process the request and will send the response appropriately to the client.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Request&lt;/strong&gt; will contain information such as the route (URL Path), HTTP Method (POST, GET, etc), Headers (e.g. content-type) and the body, which will contain the payload or any data, that is required by the server to perform the operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Response&lt;/strong&gt; will also contain information such as the HTTP Status (e.g 200, 201), implying the result of operation, Response Headers (e.g. content-type) and the body which is the payload, that will tell the client about the status of the operation.&lt;/p&gt;

&lt;p&gt;We will not dive deep into more things but just keep in mind that client sends request to the server and server provides the response. Now let’s proceed to our main topic cURL.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is cURL
&lt;/h2&gt;

&lt;p&gt;cURL is an utility or an software that allows us to send an request to the server, receive the response and show the data appropriately inside the terminal.&lt;/p&gt;

&lt;p&gt;It can also upload and download files from the web servers and also support multiple protocols such as FTP, SMTP, Telnet and more, hence making this a really powerful utility for connecting with servers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Programmers loves cURL
&lt;/h2&gt;

&lt;p&gt;Well, there’s many reasons programmers love cURL command and many even like using this command over other software.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;No Installation needed&lt;/strong&gt;: For many programs such as Postman or Chrome, they need to be installed on the OS, but cURL usually comes pre-installed on all modern OS, making it much easier to switch to any OS and start working immediately from the terminal using cURL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Great for No-GUI environments&lt;/strong&gt;: Many times when working on servers, we don’t have access to GUI programs and this is where the cURL utility really shines. It doesn’t have any fancy UI and can work from the terminal as CLI application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lightweight&lt;/strong&gt;: cURL is a very lightweight software unlike other clients such as chrome or postman.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multiple Protocol Support&lt;/strong&gt;: cURL supports multiple protocols which clients like chrome don’t and with option to upload/download files from server as well, really makes it a great utility.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, that we understood what is cURL and why programmers love it. You might be thinking; “Hmm, okay but then why we learned the client-server architecture first?”&lt;/p&gt;

&lt;p&gt;Well, because, now we are going to learn the cURL commands and try sending headers, payloads and other information as well.&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic cURL Commands
&lt;/h2&gt;

&lt;p&gt;Let’s understand some basic cURL commands, that we can use in our everyday life as developers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fetch the Webpage
&lt;/h3&gt;

&lt;p&gt;To fetch the webpage from the a server, we can use the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;curl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://google.com&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Response we got from the server was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;HTML&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;HEAD&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;meta&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;http-equiv&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"content-type"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"text/html;charset=utf-8"&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;TITLE&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;301&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Moved&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;/TITLE&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;/HEAD&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;BODY&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;H1&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;301&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Moved&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;/H1&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;The&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;document&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;has&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;moved&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;HREF&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://www.google.com/"&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;here&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;/A&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;/BODY&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;/HTML&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, you can see that the server replied us with &lt;code&gt;301&lt;/code&gt; status code with message &lt;code&gt;document was moved&lt;/code&gt;. This happens because the basic cURL command will not follow up with the redirects.&lt;/p&gt;

&lt;p&gt;We can use &lt;code&gt;-L&lt;/code&gt; flag which means &lt;code&gt;follow redirects&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;curl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-L&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://google.com&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Response we get from the server was:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbv9sznmjsgbb5agsvyn2.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbv9sznmjsgbb5agsvyn2.webp" alt="Curl Terminal" width="800" height="679"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hence the &lt;code&gt;-L&lt;/code&gt; flag will follow the redirects and will print the entire HTML code from the webpage on the terminal.&lt;/p&gt;

&lt;h3&gt;
  
  
  View the Response Headers
&lt;/h3&gt;

&lt;p&gt;Headers are sent by the server as the response. To view the headers we can use &lt;code&gt;-I&lt;/code&gt; flag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;curl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-I&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://google.com&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Response we get from the server is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;~/Developer/cohort/curl/&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;curl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-I&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://google.com&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;HTTP/2&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;301&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;location:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://www.google.com/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;content-type:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;text/html&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;charset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;UTF-8&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nx"&gt;content-security-policy-report-only:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;object-src&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'none'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;base-uri&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'self'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;script-src&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'nonce-B_J2kdosi1cTamYOJzeVxg'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'strict-dynamic'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'report-sample'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'unsafe-eval'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'unsafe-inline'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;http:&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;report-uri&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://csp.withgoogle.com/csp/gws/other-hp&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;date:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Tue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;27&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Jan&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;2026&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;12:40:23&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;GMT&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;expires:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Thu&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;26&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Feb&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;2026&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;12:40:23&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;GMT&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;cache-control:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;public&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;max-age&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2592000&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;server:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;gws&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;content-length:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;220&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;x-xss-protection:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;x-frame-options:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SAMEORIGIN&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;alt-svc:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;h3&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;":443"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ma&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2592000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;h3-29&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;":443"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ma&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2592000&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can see the headers that was sent by the server as response to our client, being shown in the terminal. However these are only the headers, if you want to see &lt;code&gt;Headers + Response&lt;/code&gt;, then use the &lt;code&gt;-i&lt;/code&gt; flag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;curl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-i&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://google.com&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Response we get from the server is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;~/Developer/cohort/curl/&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;curl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-i&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://google.com&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;HTTP/2&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;301&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;location:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://www.google.com/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;content-type:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;text/html&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;charset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;UTF-8&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nx"&gt;content-security-policy-report-only:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;object-src&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'none'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;base-uri&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'self'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;script-src&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'nonce-1k2aoSXbjjeLVNgA55J97A'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'strict-dynamic'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'report-sample'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'unsafe-eval'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'unsafe-inline'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;http:&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;report-uri&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://csp.withgoogle.com/csp/gws/other-hp&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;date:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Tue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;27&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Jan&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;2026&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;12:42:23&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;GMT&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;expires:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Thu&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;26&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Feb&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;2026&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;12:42:23&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;GMT&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;cache-control:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;public&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;max-age&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2592000&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;server:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;gws&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;content-length:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;220&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;x-xss-protection:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;x-frame-options:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SAMEORIGIN&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;alt-svc:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;h3&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;":443"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ma&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2592000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;h3-29&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;":443"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ma&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2592000&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;HTML&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;HEAD&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;meta&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;http-equiv&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"content-type"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"text/html;charset=utf-8"&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;TITLE&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;301&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Moved&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;/TITLE&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;/HEAD&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;BODY&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;H1&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;301&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Moved&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;/H1&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;The&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;document&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;has&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;moved&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;HREF&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://www.google.com/"&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;here&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;/A&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;/BODY&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;/HTML&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From the above response, you can see that the Headers are being displayed along with the response sent by the server.&lt;/p&gt;

&lt;h3&gt;
  
  
  Send Request Headers to the server
&lt;/h3&gt;

&lt;p&gt;We have seen the response headers, that server send as the response. However, we can also send some headers from our client to the server.&lt;/p&gt;

&lt;p&gt;We can use &lt;code&gt;-H&lt;/code&gt; flag followed by &lt;code&gt;Header-Name: value&lt;/code&gt; along with our cURL command to the server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;curl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-H&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"content-type:application/json"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://google.com&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Receive Payload from the Server
&lt;/h3&gt;

&lt;p&gt;As seen from our client-server architecture, we can receive, the payload from the server. We can specify the HTTP method using &lt;code&gt;-X&lt;/code&gt; flag, followed by the HTTP method such as GET, POST etc.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;curl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-X&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;GET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://jsonplaceholder.typicode.com/posts/1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Response we get from the server is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;~/&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;curl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-X&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;GET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://jsonplaceholder.typicode.com/posts/1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="s2"&gt;"userId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="s2"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="s2"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"sunt aut facere repellat provident occaecati excepturi optio reprehenderit"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="s2"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can see the payload we received from the server.&lt;/p&gt;

&lt;h3&gt;
  
  
  Send Payload to the Server
&lt;/h3&gt;

&lt;p&gt;To send some data (payload) to the server, we can use the &lt;code&gt;POST&lt;/code&gt; method. We can also pass headers using &lt;code&gt;-H&lt;/code&gt; flag and data using &lt;code&gt;-d&lt;/code&gt; flag if necessary.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="c"&gt;# make sure they are in same line, I just seperated them to make it more visible&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;curl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-X&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;POST&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;\&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nt"&gt;-H&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"content-type: application/json"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;\&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nt"&gt;-d&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'{"name": "Manmeet", "role": "admin"}'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;\&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;https://jsonplaceholder.typicode.com/users&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Response I get from the server was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;~/&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;curl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-X&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;POST&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-H&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"content-type: application/json"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-d&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'{"name" : "Manmeet", "role":"admin"}'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://jsonplaceholder.typicode.com/users&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Manmeet"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="s2"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"admin"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="s2"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, you can see that the data included my name and role as &lt;code&gt;manmeet&lt;/code&gt; and &lt;code&gt;admin&lt;/code&gt;, which the server acknowledged and sent me as a response for the confirmation, that my data was received by server.&lt;/p&gt;

&lt;p&gt;You can also use other methods such as PUT, PATCH, OPTIONS, DELETE as well.&lt;/p&gt;

&lt;h3&gt;
  
  
  Filtering Data with Query Parameters
&lt;/h3&gt;

&lt;p&gt;Sometimes, you don't want the server to send back &lt;em&gt;everything&lt;/em&gt;. You might want to filter the data, limit the number of results, or sort them. In Client-Server architecture, we usually handle this by passing &lt;strong&gt;Query Parameters&lt;/strong&gt; directly in the URL.&lt;/p&gt;

&lt;p&gt;Query parameters start with a &lt;code&gt;?&lt;/code&gt; after the URL path. Multiple parameters can be separated by the ampersand &lt;code&gt;&amp;amp;&lt;/code&gt; symbol, like &lt;code&gt;/users?_limit=5&amp;amp;search=A&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Let's say we want to fetch posts from the server, but we only want the top 5 results, and specifically for user ID 1. We can combine these using parameters provided by the JSONPlaceholder API.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;curl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://jsonplaceholder.typicode.com/posts?_limit=5&amp;amp;userId=1"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The server will return an array containing only &lt;strong&gt;5 post objects&lt;/strong&gt; that belong to &lt;strong&gt;User 1&lt;/strong&gt;, rather than the full list.&lt;/p&gt;

&lt;h4&gt;
  
  
  Downloading Files (&lt;code&gt;-o&lt;/code&gt;)
&lt;/h4&gt;

&lt;p&gt;Sometimes the response isn't text as it could be a massive JSON, an image, or a zip file. Printing this response to server will cause a mess, making it harder to understand.&lt;/p&gt;

&lt;p&gt;Use the &lt;code&gt;-o&lt;/code&gt; (output) flag to save the response to a file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Save the Google homepage source code to a file named 'google.html'&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;curl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-o&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;google.html&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://www.google.com&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Above command will create a new file &lt;code&gt;google.com&lt;/code&gt; and will print the source code of &lt;code&gt;google.com&lt;/code&gt; webpage inside it.&lt;/p&gt;

&lt;h4&gt;
  
  
  Debugging with Verbose Mode (&lt;code&gt;-v&lt;/code&gt;)
&lt;/h4&gt;

&lt;p&gt;As a developer, things &lt;em&gt;will&lt;/em&gt; break. Maybe your API returns a &lt;code&gt;500 Error&lt;/code&gt;, or your authentication fails. This is where &lt;code&gt;curl&lt;/code&gt; becomes a diagnostic tool.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;-v&lt;/code&gt; (verbose) flag tells cURL to show the entire conversation—the handshake, the hidden headers, and the raw traffic.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;curl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-v&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://google.com&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Understanding the Output:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lines starting with &lt;code&gt;*&lt;/code&gt; show the connection process (DNS resolution, SSL handshake).&lt;/li&gt;
&lt;li&gt;Lines starting with &lt;code&gt;&amp;gt;&lt;/code&gt; are the data &lt;strong&gt;you sent&lt;/strong&gt; (Request).&lt;/li&gt;
&lt;li&gt;Lines starting with &lt;code&gt;&amp;lt;&lt;/code&gt; are the data &lt;strong&gt;received&lt;/strong&gt; (Response).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This gives you "X-Ray vision" into the HTTP protocol.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We started this journey understanding the &lt;strong&gt;Client-Server Architecture&lt;/strong&gt; because tools are useless if you don't understand the system they interact with. We then moved to &lt;strong&gt;cURL&lt;/strong&gt;, exploring how to fetch pages, inspect headers, and send data using methods like POST. While graphical tools hide the complexity, cURL forces you to understand the raw &lt;strong&gt;HTTP protocol&lt;/strong&gt;. It makes you think about headers, payloads, and status codes. This doesn't just make you better at using the command line; it makes you a better Backend Developer.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>cli</category>
      <category>networking</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Web Browser Internals Explained</title>
      <dc:creator>Manmeet Singh</dc:creator>
      <pubDate>Thu, 05 Feb 2026 17:56:43 +0000</pubDate>
      <link>https://dev.to/thatsmanmeet/web-browser-internals-explained-39l</link>
      <guid>https://dev.to/thatsmanmeet/web-browser-internals-explained-39l</guid>
      <description>&lt;p&gt;We all use web browsers every day. Whether it's surfing social media, watching videos on YouTube, or doing a quick search, browsers have become such an essential part of our lives that we hardly notice them. However, behind this impressive technology is some great engineering, and that's what we will explore today.&lt;/p&gt;

&lt;p&gt;Before we dive in deeply, let's first address the obvious question: What exactly is a web browser?&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Web Browser
&lt;/h2&gt;

&lt;p&gt;A web browser is a software application used to access and retrieve information and resources from the World Wide Web, acting as an interface between the user and the internet. Simply put, a web browser is an application that lets a user visit websites.&lt;/p&gt;

&lt;p&gt;Technically Speaking, A browser is a compiler and rendered which takes the raw text resources like HTML, CSS and JS and convert them into the visual representations on the screen.&lt;/p&gt;

&lt;p&gt;There are some excellent web browsers available, such as Chrome, Edge, Firefox, Safari, and Brave.&lt;/p&gt;

&lt;h2&gt;
  
  
  Components of Web Browser
&lt;/h2&gt;

&lt;p&gt;A web browser consists of multiple components such as:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;User Interface:&lt;/strong&gt; This is the Graphical User Interface (GUI) part of the browser that the user can see and interact with. For example, in the Chrome browser, this includes the opening window with an address bar, bookmarks, shortcuts, and similar UI features that a user can see and interact with.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Browser Engine&lt;/strong&gt;: This part acts as the bridge between the User Interface (UI) and the Rendering Engine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rendering Engine:&lt;/strong&gt; This is the core of the browser. It transforms documents like HTML and CSS into their respective trees (DOM &amp;amp; CSSOM), which are used to display content on the webpage. In other words, it turns code into pixels. There are many rendering engines, such as Blink, Gecko, and Webkit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Networking&lt;/strong&gt;: This component is very useful for performing network operations like DNS resolution and fetching resources such as HTML, CSS, and images from servers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JS Interpreter&lt;/strong&gt;: This component runs the JavaScript code on our website. It is also known as the JavaScript engine which parses and executes the JavaScript code. Modern Engines also use JIT (Just In Time) Compilation to speed up this process. There are many popular JavaScript engines, such as V8, SpiderMonkey, and WebKit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UI Backend:&lt;/strong&gt; This component interacts with the operating system and allows the display of UI components to users, such as windows and buttons in the browser's interface.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disk Persistence:&lt;/strong&gt; This Layer lets the browser store and retrieve data from the system's storage with the operating system's permission. This includes storage options like Cookies, LocalStorage, and SessionStorage.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How a WebPage is Rendered?
&lt;/h2&gt;

&lt;p&gt;Now let’s go behind the scenes, of what happens when you enter a URL and access a website on the browser.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj1gpevd7zz7yuqpmuipq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj1gpevd7zz7yuqpmuipq.png" alt="Browser Web Page Rendering" width="800" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;When you type a URL into the browser (e.g., thatsmanmeet.com), the Network Layer handles DNS resolution and sends a request to the server. It retrieves resources like HTML, CSS, and other elements such as images and fonts.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once the HTML and CSS are fetched, these documents are sent to their respective &lt;strong&gt;Parsers&lt;/strong&gt;. The Parser converts the raw text in these files into their respective Object Models.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;For HTML, the raw text like &lt;code&gt;&amp;lt;p&amp;gt;Hello&amp;lt;/p&amp;gt;&lt;/code&gt; is broken into tokens and converted into objects known as Nodes. A &lt;strong&gt;Node&lt;/strong&gt; is a single element or component on the webpage that represents an HTML element. These Nodes are arranged into a tree-like structure known as the &lt;strong&gt;Document Object Model (DOM).&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;For CSS, the raw text file is also broken into tokens and then parsed into another tree-like structure known as the &lt;strong&gt;CSS Object Model (CSSOM).&lt;/strong&gt; This tree represents all the styles associated with the DOM Nodes. This step is important because the browser needs to decide which rule takes precedence among the browser default, user-defined stylesheets, or inline styles.&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Once both the &lt;strong&gt;DOM and CSSOM&lt;/strong&gt; trees are built, they are combined into a single structure called the &lt;strong&gt;Render Tree.&lt;/strong&gt; This process is also known as frame construction in the Gecko Engine. This structure only includes the elements that will be visible on the webpage. Therefore, the Render Tree determines which elements will be displayed on the webpage.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Elements with the &lt;code&gt;display:none&lt;/code&gt; CSS property exist in the DOM but not in the Render Tree.&lt;/li&gt;
&lt;li&gt;Elements with &lt;code&gt;visibility: hidden&lt;/code&gt; exist in both the DOM and Render Tree, but they take up empty space.&lt;/li&gt;
&lt;li&gt;Meta tags like &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt;, etc., are also excluded from the Render Tree.&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Now that our parsing phase is complete, the browser will begin the rendering process.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;At this point, the browser knows what to draw or render, thanks to the Render Tree, but it doesn’t know where each element should be placed on the page. For example, it doesn’t know whether the footer should be at the top or bottom of the page. This is where the next phase, &lt;strong&gt;Layout (Reflow)&lt;/strong&gt;, comes into play.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;In the &lt;strong&gt;Layout (Reflow)&lt;/strong&gt; phase, the browser calculates the exact position and size of every element in the Render Tree to be shown in the viewport. It also determines the exact pixel coordinates of every frame (box), taking into account padding, margins, borders, and other information. This is a computationally expensive process.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Now the browser knows where to draw everything. Next comes the &lt;strong&gt;Painting&lt;/strong&gt; process, which converts the layout into pixels. The browser fills in the pixels with text colors, background images, images, shadows, borders, etc. This is usually done in multiple layers, similar to how Photoshop works.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Finally, we reach the &lt;strong&gt;Display&lt;/strong&gt; phase, which includes another process known as &lt;strong&gt;Compositing&lt;/strong&gt;. Since the browser paints in layers, it needs to flatten the layout to display it properly on the screen. Through the process of compositing, the image is finally displayed on the screen.&lt;/p&gt;&lt;/li&gt;

&lt;/ol&gt;

&lt;h3&gt;
  
  
  The JavaScript Interruption
&lt;/h3&gt;

&lt;p&gt;You might have noticed that we didn't mention JavaScript in the flow above. That is because strictly speaking, JavaScript is an &lt;strong&gt;interruption&lt;/strong&gt; to the rendering process.&lt;/p&gt;

&lt;p&gt;When the HTML Parser is happily building the DOM and encounters a &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag, everything stops.&lt;/p&gt;

&lt;p&gt;The browser stops building the DOM because it doesn't know what changes the JavaScript might make, such as adding, removing, or editing elements. So, the browser hands control over to the JavaScript Engine (like V8) to interpret and run the JavaScript code.&lt;/p&gt;

&lt;p&gt;Only after the JavaScript finishes running does the Rendering Engine continue building the DOM. This is why it's usually recommended to place &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags at the end of HTML documents, just before the closing &lt;code&gt;body&lt;/code&gt; tag, so the DOM construction isn't interrupted.&lt;/p&gt;

&lt;p&gt;If a &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag is placed inside the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; and the JavaScript file being loaded is quite large, the user would just see a blank white or black page, which would be a poor user experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reflow vs Repaint
&lt;/h3&gt;

&lt;p&gt;It is often confusing to understand the difference between Reflow and Repaint, but distinguishing between them is crucial for writing performant CSS.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reflow:&lt;/strong&gt; Reflow happens when you change the layout or geometry of the page. The browser has to re-calculate the positions and dimensions of elements. Changing properties like &lt;code&gt;width&lt;/code&gt;, &lt;code&gt;height&lt;/code&gt;, &lt;code&gt;margin&lt;/code&gt;, &lt;code&gt;position&lt;/code&gt;, or resizing the browser window. This is computationally expensive as single element causing reflow can cause browser to recalculate the layout for its parents and children as well.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Example:&lt;/strong&gt; You hover over an element and it expands from 200px to 400px, pushing all other text down.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Repaint:&lt;/strong&gt; Repaint happens when you change the look of an element without changing its &lt;em&gt;size&lt;/em&gt; or position. Changing properties like &lt;code&gt;color&lt;/code&gt;, &lt;code&gt;background-color&lt;/code&gt;, or &lt;code&gt;visibility&lt;/code&gt;. This skips the Layout phase entirely and is much faster than a Reflow because the browser doesn't need to do any geometry calculations.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Example:&lt;/strong&gt; You hover over a button and its background color shifts from blue to dark blue.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;A browser is far more than just a window to the internet. To the average user, the web feels like magic. But as developers, we now know it is actually a precise feat of engineering. You now understand exactly what happens under the hood from the moment a URL is typed to the millisecond the pixels appear on the screen.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>programming</category>
      <category>architecture</category>
    </item>
  </channel>
</rss>
