What happens when we visit a URL? Follow the thread for a short concise answer. #howwebworks #web #webdevelopment #interview #question #frontend The beautifully written detailed resource can be found here : github.com/alex/what-happ…
1. Every URL has a unique IP address associated with it. These mappings are stored in DNS servers and are called DNS records.
2. Let's say we visit google.com. A DNS lookup is performed. To save computers searching the entire web, it first searches for the DNS records locally.
3. The browser checks for the IP address of the URL(DNS records) in its cache. If it doesn't find the records it moves to OS cache, Router cache and finally the query is sent to the ISP to check its cache.
4. If the record is still not found, a full DNS search is conducted. The request is made to different DNS servers. (DNS records are not stored on any one server but are distributed among several global servers) The below figure shows the DNS hierarchy.
5. Google server will find the matching DNS record and returns the required IP address to the browser.
6. Once the browser has the IP address, it then initiates a TCP connection with the server via 'TCP-3 way handshake'. (I)Client sends SYN signal asking the server if it is open for connection. (ii) If the server is up it sends SYN/ACK signal. (iii) Client sends back ACK signal.
7. Once the TCP connection is established for data transmission, the browser can then communicate with the server via HTTP requests and ask for the resources.(HTML, CSS, images, etc.)
8. The server supplies the browser with the resources which the browser then parses and renders on the screen which we as the user see.
That's it. All the above process happens when we visit a URL though it hardly takes a second to complete. Now you're ready with the question which can possibly appear in your next interview.
United States Trends
- 1. #Worlds2025 56.1K posts
- 2. Good Sunday 51.2K posts
- 3. Silver Scrapes 3,956 posts
- 4. Doran 20.8K posts
- 5. #T1WIN 31.9K posts
- 6. #T1fighting 3,739 posts
- 7. Faker 37.6K posts
- 8. O God 7,712 posts
- 9. Blockchain 201K posts
- 10. #sundayvibes 3,580 posts
- 11. Faye 47.8K posts
- 12. Option 2 4,520 posts
- 13. Oregon State 4,694 posts
- 14. Sam Houston 1,637 posts
- 15. Vergil 9,031 posts
- 16. Boots 30.4K posts
- 17. John Denver N/A
- 18. Hyan 1,580 posts
- 19. Louisville 14.5K posts
- 20. The 50 291K posts
Something went wrong.
Something went wrong.