What happens behind the scehen if i hit some domain say https://somedomain.com in browser
Created on: Aug 2, 2024
Suppose i have a domain https://somedomain.com with index page index.html as below
<!DOCTYPE html> <html> <head> <title>Example Page</title> </head> <body> <h1>Hello, World!</h1> <p>This is a paragraph.</p> </body> </html>
When we hit https://somedomain.com from out browser, below process happens.
- DNS Resolution Browser query domain name system and get the ip address behind it.
- It establiblish connection to web server using SSL/TSL protocol.
- It sends get request at / path which resolves to index.html
- We server receives the request and send response with index.html along with http headers.
- Web browser parses the HTML document and constructs the DOM (Document Object Model) tree which looks like below
- Document - html - head - title ("Example Page") - body - h1 ("Hello, World!") - p ("This is a paragraph.")
Let's try hitting developer.mozilla.org along with developer option. You can see as below
You can see timing break down phase in chrome. Details are here