How does Chrome know my geolocation?

前端 未结 6 1303
囚心锁ツ
囚心锁ツ 2020-12-24 13:16

Chrome seems to be very accurate in detecting my location. How does it do it? Can you point me to the source code?

6条回答
  •  南笙
    南笙 (楼主)
    2020-12-24 13:52

    a browser on a pc does not have a gps, however it has an external ip address (usually the router's external ip address). if other components behind the same router has a gps - this pins location to that ip address and via location services attaches this location to the browser.

提交回复
热议问题