搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Firefox has the wrong location for me

  • 7 回覆
  • 2 有這個問題
  • 43 次檢視
  • 最近回覆由 zeroknight

more options

Firefox seems to think I am in Hot Springs Village, Arkansas. I am actually in New York and have no connection to Hot Springs Village, Arkansas.

Google Chrome on the same (Windows 11 Microsoft Surface Pro X) computer has the right location for me, as does Microsoft Edge. Checking my IP address with https://www.iplocation.net/ gives a location reasonably close to my real location and nowhere near Arkansas.

If I clear all cache in Firefox, it does go back to the right address - at the cost of a lot of annoying re-entry of routine information. But after a few days it goes back to insisting I am in Hot Springs Village, Arkansas.

Before I switch to Chrome, is there a way to fix this?

Firefox seems to think I am in Hot Springs Village, Arkansas. I am actually in New York and have no connection to Hot Springs Village, Arkansas. Google Chrome on the same (Windows 11 Microsoft Surface Pro X) computer has the right location for me, as does Microsoft Edge. Checking my IP address with https://www.iplocation.net/ gives a location reasonably close to my real location and nowhere near Arkansas. If I clear all cache in Firefox, it does go back to the right address - at the cost of a lot of annoying re-entry of routine information. But after a few days it goes back to insisting I am in Hot Springs Village, Arkansas. Before I switch to Chrome, is there a way to fix this?

所有回覆 (7)

more options

When you clear all cache, is it enough just to clear the Web Content Cache (see: How to clear the Firefox cache) or do you also need to clear cookies and site data?

If you did NOT give the confused site permission to access precise location:

As you know, sites will guess your location based on your IP address. Just in case Firefox has discovered some strange proxy settings that Chrome isn't using, try changing this setting on the Settings page. Either:

  • "3-bar" menu button > Settings
  • (menu bar) Tools > Settings
  • type or paste about:preferences into the address bar and press Enter/Return to load it

In the very tiny search box at the top of the page, type proxy and Firefox should filter to the "Network Settings" section of the page.

Click the Settings button, change the top setting to "No Proxy" and then click the OK button at the bottom of the dialog to save your change.

If you DID give the confused site permission to access precise location:

Firefox will perform a lookup with Google of the nearby WiFi hotspots provided to it by Windows. It would be a strange coincidence if that lookup returns a match somewhere else...

more options

Thanks, but the problem persists.

The problem seems to be what Firefox is giving to google location services. I uninstalled Firefox and reinstalled it. For a while everything was OK. But at some point I asked for "car inspection near me" (I need to get a car inspected!).

It properly showed garages near me, but also a popup showed saying that google wanted to know my location. I said to accept the request, and then it changed to Hot Springs, Arkansas. Doing the same search for "car inspection near me" on Google Chrome leaves me in New York, where I am IRL.

Mozilla says Firefox uses google location services and gives it: "your computer's IP address, information about the nearby wireless access points, and a random client identifier, which is assigned by Google, that expires every 2 weeks."

My computer's IP address is clearly in New York. Google knows I'm not in Arkansas - my Google timeline spookily does show everywhere I've been recently, and Arkansas isn't included.

I don't know how Firefox is finding "nearby wireless access points," but they're obviously not really in Arkansas. But I'm thinking that since other browsers seem to have a correct location, probably IP-address-based, whatever Firefox is giving google location services as "nearby wireless access points" is the cause of the confusion. I have an Eero mesh network which may somehow be confusing it, although (a) all the IP addresses on the network are clearly in New York; (b) I've been in another location with an Eero network with no problems.

So how do I make Firefox tell me what it's giving google location services? I can just block all location requests and it will fall back to IP address, but that isn't quite as precise as using the (real) wifi access points and I'll never know why it got confused.

more options

I am not aware of a way to peer inside the process of querying Windows for WiFi data and sending that to Google. Seems like there must be a bug in one of the two steps if you get different results in different browsers, but then again, I don't know if Chrome uses the same method. Hopefully one of the other regulars here knows where to poke and prod.

more options

See if it still happens in a new profile, Developer Edition or after a profile refresh.

You can manually override your precise location to any desired latitude and longitude coordinates. First disable the Windows location service and then in Firefox go to about:config and change geo.provider.network.url to:

data:,{"location":{"lat":0.0,"lng":0.0},"accuracy":1000}

more options

zeroknight said

You can manually override your precise location to any desired latitude and longitude coordinates. First disable the Windows location service and then in Firefox go to about:config and change geo.provider.network.url to: data:,{"location":{"lat":0.0,"lng":0.0},"accuracy":1000}

That's interesting!

Since it's not obvious, "disable the Windows location service" involves this (for Firefox users on Windows):

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

More info on about:config: Configuration Editor for Firefox. The moderators would like us to remind you that changes made through this back door aren't fully supported and aren't guaranteed to continue working in the future.

(2) In the search box in the page, type or paste geo.provider.ms-windows-location and pause while the list is filtered

(3) Double-click the preference (or click the toggle button toward the right end of the row) to switch the value from true to false

Now Firefox should use your specified geo.provider.network.url instead of the normal location services. If it doesn't seem to change, you might need to restart Firefox (for example, menu > Exit then start up again).


0,0 is not a relevant location for your question, but you can look up your personal lat and lon using one of your other browsers and then substitute that for the zeroes.

Or maybe you want to report that you're in Times Square (this is from the MakeUseOf article https://www.makeuseof.com/tag/disable-fake-location-firefox-internet-explorer-chrome/):

data:application/json,{"location": {"lat": 40.7590, "lng": -73.9845}, "accuracy": 27000.0}

more options

Thanks! If I clear cookies, the problem goes away, but as noted that's annoying. Putting in a fixed location is OK, except that I'm not always in the same location. The answer seems to be to just say no when the popup asking about allowing a precise location comes up - that seems to keep it using the IP address rather than whatever is causing the problem with Firefox and only Firefox.

more options

It is unclear if the issue is with the Windows location service or Firefox location service. If you have location permission enabled in your Windows settings, try disabling it or changing geo.provider.ms-windows-location to false in about:config.