Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6614041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:17:27+00:00 2026-05-25T20:17:27+00:00

Why does HTML5 geolocation let you share your location? What is main purpose of

  • 0

Why does HTML5 geolocation let you share your location? What is main purpose of using geolocation, as you can get the location with IP address as well. Is there any difference between these two methods?

I’m asking because geolocation requires the user’s permission and also doesn’t work on all browsers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:17:28+00:00Added an answer on May 25, 2026 at 8:17 pm

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

    IP-based GeoLocation depends on databases associated with ISPs to figure out where you are. This doesn’t work well when your ISP services a very large area and gives out dynamic IP addresses. The address in one town today might be 100 miles away tomorrow. Furthermore, those databases are usually not updated frequently. If your ISP sells off blocks of IPs or moves them to a new town, the database may still incorrectly think you’re somewhere else.

    HTML5 location uses services provided by your browser to figure out where you are. If your computer has GPS built-in (such as on many mobile devices and some laptops), it will know exactly where you are. This makes it much more useful for webapps that have a navigation or location component. For devices without GPS, it can often provide a very good approximation based on nearby known wireless signals and other factors, such as tracing what routers your computer goes through when connecting to the internet. The exact implementation depends on the computer, what hardware it has available, and how the browser chooses to do things.

    For example, when I check an IP-based location service, it says that I’m in a particular large city in the same general area that I live in, but it’s actually about 50 miles away.
    When I use an HTML5 location based service to figure out where I am, it’s only off by about 20 blocks.

    If you’re developing a webapp which needs location data, try using HTML5 GeoLocation if at all possible. Set up a fallback, so that if HTML5 location fails, you can use an GeoIP solution instead. This way, you will get optimal accuracy on supported browsers and devices, but will still have a solution in place when the HTML5 data are not available.

    If you used the geolocation-javascript project from Google Code, you could use the following 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
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my code to get current location using Geolocation property of HTML5, <!DOCTYPE
Is there a library out there that will get you your approximate location using
I have a application which reports my location using HTML5 geolocation. The application works
Is it possible to track a person's location, using HTML5's geolocation API, while his
Newbie question. I'm trying to make a mobile site using html5's geolocation (I know
Is it possible to create a socket based multi-player game client using html5? Does
How does the HTML5 Voice input on Chrome (Mac) get access to the mic?
I know HTML5 canvas fairly well, I know the basics and animation using loops
I am using the HTML5 Geolocation API to find the longitude and the latitude
What video format does HTML5 support that is compatible with the iPhone/iPad? I was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.