Skip to main content

Command Palette

Search for a command to run...

Understanding How Browser Works:

Updated
2 min read
Understanding How Browser Works:

have you ever think that what happens what you write a URL on browser and click enter? The multi command process of million lines of code how does it render on your screen within milliseconds. In this blog I will tell you how does this process happens beyond your screen.

What is browser :

A browser is simply software that lets you access, view, and interact with websites on the Internet. what browser does?

What browser does ?

  • It fetches data from web servers when you enter a URL

  • it downloads files such as HTML, images, text, video, etc., using protocols like HTTP/HTTPS.

  • it parser those files and render it on display .

  • it lets client to navigate in web page

Main parts of Browser :

  1. UI (User Interface) : Ye woh parts hain jinke saath user interact karta hai. like tabs , address bars, navigation bar, bookmark bar, menu, settings etc.

  2. Browser Engine: UI aur rendering engine ke beech bridge ka kaam karta hai. Decide karta hai kab, kaise page load hoga.

  3. Rendering Engine : Ye engine code ko webpage me convert karta hai.

  4. javascript engine: Website ka logic & interactivity yahin run hoti hai.

  5. Networking layer: Internet se baat karne ka kaam karta hai.

  6. Disk api : Browser locally data store karta hai for speed & convenience.

Networking: how a browser fetches HTML, CSS, JS

For now I will explain this in diagrammatic matter . read that image carefully to understand how browser works.

DOM & CSSOM creation:

Dom is created while parsing HTML files and CSSOM is created while parsing CSS files. both works together while rendering inside browser. This 2 DOM and CSSOM meets inside render tree where their workflow is designed . after render tree the final frame is get constructed and then reflow and painting occurs then then the website is get displayed to user.


Thank you for reading . Have a happy learning journey. I hope this article added some value for your given precious time.