4/ How exactly the browser determines the location varies.
It may be from GPS π°οΈ or cell towers πΌ(on mobile) or wifi πΆ or IP-to-location. each of these methods have pros and cons.
Developers can ask the browser for a more or less accurate location.
Here's what that looks like in basic javascript:
5/ Assuming the user gives permission π, the browser then receives a longitude and latitude, and potentially other info like altitude.
Important: depending on the tech used these coords may be more or less accurate ππ The accuracy value is a number in meters that the actual position may vary from the reported position.
https://developer.mozilla.org/en-US/docs/Web/API/GeolocationCoordinates
Note: browsers also allow users to turn off location prompting.
#geoeducation