Is there any counterpart to geolocation(html 5) in html 4. Was there any method of determining the user's location in html4? One more question that I have is how does the geolocation get the user's location, from the IP Address or something else?
-
Its counterpart can be seen here: https://stackoverflow.com/questions/409999/getting-the-location-from-an-ip-address – LethalMaus Aug 17 '17 at 12:43
2 Answers
HTML5 geolocation leaves the actual means of finding the location up to the browser/client to implement. It only standardizes the Javascript API by which a website can get the location from the browser. The browser may use actual GPS hardware, known locations of nearby WiFi spots, GSM cell tower triangulation or whatever else it can. Browsers may support this standardized API without supporting any of the other parts of what is collectively called HTML5.
Before this standardization, there was no standard. There were some proprietary/plugin based things like Google Gears, but they were never widely adopted or supported. The most common way to find a client's location was, and still is, through the IP address and large databases that map IPs to known locations.

- 510,633
- 85
- 743
- 889
-
can you provide an example how you can get the location via ip address with html4 ? i need to compare html4 and html5 and was thinking about an alternate solution instead of geolocation api – Khan Mar 17 '17 at 19:29
you could use json call to this http://ip-api.com/json. geolocation without gps is done though resolution of hosting and wifi/gsm cells...

- 2,776
- 1
- 19
- 10