Skip to content

Instantly share code, notes, and snippets.

@nnaumenko
Last active August 7, 2019 07:06
Show Gist options
  • Save nnaumenko/f39dc9d7c74c8fb48783855e6375f76d to your computer and use it in GitHub Desktop.
Save nnaumenko/f39dc9d7c74c8fb48783855e6375f76d to your computer and use it in GitHub Desktop.
Testing: Quickly simulating geolocation position in Firefox

Sometimes one needs to quickly test web page or web app by changing the geolocation coordinates and look at the result.

Type about::config in the URL bar, then type geo.wifi.uri under search.

Set the parameter value as follows: data: application/json,{"location": {"lat": 64.1483407, "lng": -21.9403197}, "accuracy": 1200.0}, and now you are in downtown Reykjavik, Iceland.

Maniputate the latitude (decimal degrees [-90 .. 90], North is positive and South is negative), longitude (decimal degrees [-180 .. 180], East is positive and West is negative) and accuracy (in meters) to quickly simulate the desired position.

When testing is finished, do not forget to reset the parameter to default value!

This technique can be also used for privacy reasons but at the very least a VPN with an IP address consistent with new location must be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment