DEV Community

pawan deore
pawan deore

Posted on

How WEB works !

When we visit any URL in browser, so their is client and server and it sends request, client receive response, parsed and it is visible!

little bit in detail

  1. hit URL in browser .

  2. DNS server lookup for its IP.

  3. TCP/IP connection establishment with server.

  4. HTTP requests (maybe GET, POST...)

  5. If Data (page) available it responds with Data Packets with status code 200.

  6. Browser parses HTML first then looks for

    <link><script>

    resources, now depending on you added [async, defer] to script it will be executed in that order.

  7. After parsing it generates in Memory DOM tree for HTML, CSS and compile and executes JS.

  8. Browser builds DOM tree , apply styles and executing JS, now user can see the webpage and interact with it.

Thanks..

Follow me
GitHub
Linkedin

Top comments (0)