Exploring alternate worlds: How to spoof your geolocation

Entry no. 17003_

I was recently working on a project at work which grabs a visitor's geolocation and displays certain information relevant to where they are in the world. However, as with every project, there were things that needed to be debugged. The problem, however, was that everything was working just fine for me, using my own geolocation. And as any developer knows, it's exponentially more difficult to debug a problem when you can't fucking replicate it!

Enter: Geolocation Spoofing

Luckily for me, after a bit of searching the old Google, I found some information that saved me from having to drive 850mi with my laptop to debug the issue! I'm not entirely sure if this information applies to any other browser(s), but for my testing purposes, the problem was browser-agnostic, so it didn't matter what browser I used to debug/test the solution.

In Chrome, you can manually set your geolocation to a set of latitude/longitude coordinates (thank goodness!). Here's how:

Step 1: Open DevTools

Step 2: Click the three dots

Step 3: Go to More Tools -> Sensors

Step 4: Select "Other" and enter the lat/lng you want to use