Many websites take advantage of user location in order to provide a more relevant experience for their users. For example, a weather website might show the local forecast for a user's area, once the user has granted the website permission to access their location.
If you're building a UI that changes depending on where the user is located, you probably want to make sure that the site behaves correctly in different places around the world. To override your geolocation in Chrome DevTools:
Press Command+Shift+P (Mac) or Control+Shift+P (Windows, Linux, Chrome OS) to open the Command Menu.
sensors, select Show Sensors, and press Enter. The Sensors tab opens up at the bottom of your DevTools window.
From the Geolocation list select one of the preset cities, like Tokyo, or select Custom location to enter custom longitude and latitude coordinates, or select Location unavailable to see how your site behaves when the user's location is not available.
Was this page helpful?