This question may look as a duplicate one, but the existing questions did not resolve my need.
I have checked so many questions on this topic in Stackoverflow and in Google, but I couldn't find the efficient method. Almost in all the threads people have suggested this site http://www.hostip.info/ to detect the user location. And when I try to check that site, it said me "No clue about your location". And in some other sites, my city is determined based on my IP address and it is wrong.
But in google.com or bing.com, the sites determined my location exactly. How they do that? How can I get the visitor location (just the city is enough) exactly? And in some sites I saw the Google Chrome throws a question to me, "Allow this site to share your location". How they use this feature?