Why HTML5 Geolocation?

Why does HTML5 geolocation allow you to share your location? What is the main purpose of using geolocation, since you can get a location with an IP address. Is there a difference between the two methods?

I ask because geolocation requires user permission and also does not work in all browsers.

+13
source share
6 answers

HTML5 GeoLocation tends to be much more accurate than IP-based GeoLocation.

IP-based GeoLocation depends on the databases associated with Internet service providers to determine where you are. This does not work well when your ISPs serve a very large area and issue dynamic IP addresses. An address in one city today may be 100 miles from tomorrow. In addition, these databases are usually not updated frequently. If your ISP sells blocks of IP addresses or moves them to a new city, the database may still incorrectly assume that you are somewhere else.

HTML5 , , , . GPS (, ), , . webapps, . GPS , , , . , , , , - .

, IP, , , , 50 .   HTML5, , , 20 .

webapp, , GeoLocation HTML5, . , HTML5 , GeoIP. , , - , HTML5 .

geolocation-javascript Google Code, :

//determine if device has geo location capabilities
if(geo_position_js.init()){
   geo_position_js.getCurrentPosition(success_callback,error_callback);
}
else{
   // use an AJAX request to look up the location based on IP address
}
+11

IP-, .

IP- .

:

  • ( )
  • ( , , , )
  • ( )
  • ( , )

http://diveintohtml5.ep.io/geolocation.html API HTML5. W3C.

+8

, , - . IP- , - ... , . , , ,

+2

IP- . IP- , . , .

HTML5, , , . GPS, , , . , . , .

+2

IP- ( , , , , -).

: VPN , , IP- , .

HTML5 - GPS- , , 20 . , , .

HTML5 , , , , . , . - , , .

IP- , IP. IP-, - .

, .

+2

HTML5 () . , IP. , GPS- GSM WiFi. IP, , - .

+1

All Articles