Suppose I've a website created which is hosted, and running on port 5000
. Now you are on a web browser (let's say chrome) visits the webpage.
- so does chrome sends a request from your PC to my server like
mywebsite.com:5000
(as the site is listening to that port)? - and how does the port 80 (for the HTTP request) gets accessed then?
I just want to know what goes behind the scenes. How ports work? How browsers and servers handle the ports and various protocols?
I'm trying to get the answer but couldn't get one, so your help is very much appreciated
Update:
I've found the answer here: https://superuser.com/questions/1055281/do-web-browsers-use-different-outgoing-ports-for-different-tabs
And thank you for downvoting my question and that too without mentioning any reason why