<?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: Shreya Kulkarni</title>
    <description>The latest articles on DEV Community by Shreya Kulkarni (@shreya_kulkarni).</description>
    <link>https://dev.to/shreya_kulkarni</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%2F3687114%2F13d1abff-275f-4b84-a074-19665ca52199.jpg</url>
      <title>DEV Community: Shreya Kulkarni</title>
      <link>https://dev.to/shreya_kulkarni</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shreya_kulkarni"/>
    <language>en</language>
    <item>
      <title>What Happens When You Type a URL in the Browser?</title>
      <dc:creator>Shreya Kulkarni</dc:creator>
      <pubDate>Tue, 10 Mar 2026 06:32:02 +0000</pubDate>
      <link>https://dev.to/shreya_kulkarni/what-happens-when-you-type-a-url-in-the-browser-4mal</link>
      <guid>https://dev.to/shreya_kulkarni/what-happens-when-you-type-a-url-in-the-browser-4mal</guid>
      <description>&lt;p&gt;Every day we type URLs into our browser, without thinking much about what happens behind the scenes.&lt;br&gt;
But a surprising amount of technology is involved between pressing Enter and seeing a webpage appear.&lt;br&gt;
From &lt;strong&gt;DNS lookups to TCP connections and rendering HTML&lt;/strong&gt;, several systems work together in milliseconds to deliver a webpage.&lt;/p&gt;

&lt;p&gt;Let’s walk through the complete journey step-by-step.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. URL Parsing
&lt;/h2&gt;

&lt;p&gt;Suppose you type this into your browser: &lt;a href="http://www.example.com" rel="noopener noreferrer"&gt;www.example.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The browser first &lt;strong&gt;breaks the URL into components&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;https&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Protocol&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;example.com&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Domain name&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Resource path&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The browser now understands:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which &lt;strong&gt;protocol&lt;/strong&gt; to use&lt;/li&gt;
&lt;li&gt;Which &lt;strong&gt;server&lt;/strong&gt; to contact&lt;/li&gt;
&lt;li&gt;Which &lt;strong&gt;resource&lt;/strong&gt; is requested&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Checking the Browser Cache
&lt;/h2&gt;

&lt;p&gt;Before making a network request, the browser checks whether it already has the requested resource stored in its &lt;strong&gt;cache&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Modern browsers like &lt;strong&gt;Google Chrome&lt;/strong&gt; and &lt;strong&gt;Mozilla Firefox&lt;/strong&gt; store previously loaded resources locally.&lt;/p&gt;

&lt;p&gt;If the cached version is valid:&lt;/p&gt;

&lt;p&gt;✅ The page loads instantly&lt;br&gt;&lt;br&gt;
❌ No network request is required&lt;/p&gt;

&lt;p&gt;If not, the browser proceeds to the next step.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. DNS Lookup (Finding the Server)
&lt;/h2&gt;

&lt;p&gt;Humans remember &lt;strong&gt;domain names&lt;/strong&gt;, but computers communicate using &lt;strong&gt;IP addresses&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The browser must convert: example.com → 93.184.216.34&lt;/p&gt;

&lt;p&gt;This conversion happens through the &lt;strong&gt;Domain Name System (DNS)&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  DNS Lookup Flow
&lt;/h3&gt;

&lt;p&gt;The lookup process usually follows this order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Browser DNS cache&lt;/li&gt;
&lt;li&gt;OS DNS cache&lt;/li&gt;
&lt;li&gt;Router DNS cache&lt;/li&gt;
&lt;li&gt;ISP DNS server&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If still not found, DNS queries travel through the DNS hierarchy until the IP address is returned.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Establishing a Connection (TCP Handshake)
&lt;/h2&gt;

&lt;p&gt;Once the IP address is known, the browser establishes a connection with the server using &lt;strong&gt;Transmission Control Protocol&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This involves the three-way handshake:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Client → SYN&lt;/li&gt;
&lt;li&gt;Server → SYN-ACK&lt;/li&gt;
&lt;li&gt;Client → ACK&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This ensures both client and server are ready to communicate.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. TLS Handshake (If HTTPS)
&lt;/h2&gt;

&lt;p&gt;If the site uses &lt;strong&gt;HTTPS&lt;/strong&gt;, an additional TLS handshake occurs.&lt;/p&gt;

&lt;p&gt;This step:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;verifies the server’s identity&lt;/li&gt;
&lt;li&gt;establishes encrypted communication&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Encryption protocols like &lt;strong&gt;Transport Layer Security&lt;/strong&gt; protect the data transferred between the browser and server.&lt;/p&gt;

&lt;p&gt;This prevents attackers from intercepting sensitive data like passwords.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Sending the HTTP Request
&lt;/h2&gt;

&lt;p&gt;After the connection is established, the browser sends an &lt;strong&gt;HTTP&lt;/strong&gt; request.&lt;/p&gt;

&lt;p&gt;Example request:&lt;/p&gt;

&lt;p&gt;GET / HTTP/1.1&lt;br&gt;
Host: example.com&lt;br&gt;
User-Agent: Chrome&lt;br&gt;
Accept: text/html&lt;/p&gt;

&lt;p&gt;This request tells the server:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;which resource is requested&lt;/li&gt;
&lt;li&gt;which browser is making the request&lt;/li&gt;
&lt;li&gt;what data formats it supports&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  7. Server Processing
&lt;/h2&gt;

&lt;p&gt;The request reaches a web server like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Nginx&lt;/li&gt;
&lt;li&gt;Apache HTTP Server&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The server may:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;return a static file&lt;/li&gt;
&lt;li&gt;call backend code&lt;/li&gt;
&lt;li&gt;query a database&lt;/li&gt;
&lt;li&gt;generate dynamic content&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once processing is complete, the server sends an HTTP response.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Server Response
&lt;/h2&gt;

&lt;p&gt;The server sends a response that includes:&lt;/p&gt;

&lt;p&gt;HTTP/1.1 200 OK&lt;br&gt;
Content-Type: text/html&lt;/p&gt;

&lt;p&gt;Followed by the webpage content (HTML).&lt;/p&gt;

&lt;p&gt;Possible response codes include:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Code&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;200&lt;/td&gt;
&lt;td&gt;Success&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;301&lt;/td&gt;
&lt;td&gt;Redirect&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;404&lt;/td&gt;
&lt;td&gt;Page not found&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;500&lt;/td&gt;
&lt;td&gt;Server error&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  9. Browser Rendering
&lt;/h2&gt;

&lt;p&gt;Now the browser begins rendering the page.&lt;/p&gt;

&lt;p&gt;This process includes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Parsing HTML → building the DOM&lt;/li&gt;
&lt;li&gt;Parsing CSS → building the CSSOM&lt;/li&gt;
&lt;li&gt;Executing JavaScript&lt;/li&gt;
&lt;li&gt;Building the Render Tree&lt;/li&gt;
&lt;li&gt;Layout calculation&lt;/li&gt;
&lt;li&gt;Painting pixels on the screen&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;JavaScript engines such as V8 JavaScript engine handle script execution.&lt;/p&gt;




&lt;h2&gt;
  
  
  10. Additional Requests
&lt;/h2&gt;

&lt;p&gt;Most pages require additional resources such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSS files&lt;/li&gt;
&lt;li&gt;JavaScript files&lt;/li&gt;
&lt;li&gt;Images&lt;/li&gt;
&lt;li&gt;Fonts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each resource triggers additional HTTP requests until the page fully loads.&lt;/p&gt;




&lt;h2&gt;
  
  
  Entire Flow
&lt;/h2&gt;

&lt;p&gt;User types URL&lt;br&gt;
      ↓&lt;br&gt;
Browser parses URL&lt;br&gt;
      ↓&lt;br&gt;
Cache check&lt;br&gt;
      ↓&lt;br&gt;
DNS lookup&lt;br&gt;
      ↓&lt;br&gt;
TCP handshake&lt;br&gt;
      ↓&lt;br&gt;
TLS handshake (HTTPS)&lt;br&gt;
      ↓&lt;br&gt;
HTTP request sent&lt;br&gt;
      ↓&lt;br&gt;
Server processes request&lt;br&gt;
      ↓&lt;br&gt;
HTTP response returned&lt;br&gt;
      ↓&lt;br&gt;
Browser renders page&lt;/p&gt;

&lt;p&gt;All of this usually happens in less than a second.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Typing a URL may seem simple, but it triggers a complex chain of events across browsers, networks, servers, and rendering engines.&lt;/p&gt;

&lt;p&gt;Understanding this process gives you a deeper appreciation of how the web works—and helps you build better applications.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>productivity</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
