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. #FanCashDropPromotion 1,199 posts
- 2. Good Friday 53.9K posts
- 3. #FridayVibes 4,286 posts
- 4. Talus Labs 25.4K posts
- 5. #PETITCOUSSIN 11.6K posts
- 6. Publix 1,660 posts
- 7. #FridayFeeling 2,634 posts
- 8. Happy Friyay 1,208 posts
- 9. #SomosPuebloImperturbable 1,449 posts
- 10. Elise 9,075 posts
- 11. RED Friday 3,854 posts
- 12. Finally Friday 4,174 posts
- 13. Tammy Faye 3,149 posts
- 14. Sydney Sweeney 102K posts
- 15. Kehlani 16.9K posts
- 16. John Wayne 1,601 posts
- 17. Blockchain 199K posts
- 18. Piggly Wiggly N/A
- 19. Out The Window 11.7K posts
- 20. Hochul 13.6K posts
Something went wrong.
Something went wrong.