편집

다음을 통해 공유


Override geolocation with the Sensors tool

Many websites take advantage of user location in order to provide a more relevant experience for the users. For example, a weather website may show the local forecast in a user's area, after the user has granted the website permission to access the current user location.

If you are 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 Microsoft Edge DevTools:

  1. Press Ctrl+Shift+P (Windows, Linux) or Command+Shift+P (macOS) to open the Command Menu.

    The Command Menu

  2. Type sensors, select Show Sensors, and then press Enter. The Sensors tool opens at the bottom of the DevTools window.

    Show Sensors from Command Menu

  3. Click the Location dropdown list, and then:

    • Select a city, such as Tokyo.
    • Click Other to enter custom longitude and latitude coordinates.
    • Click Location unavailable to see how your site behaves when the user's location isn't available.

    Selecting Tokyo from the Location list

Note

Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons Attribution 4.0 International License. The original page is found here and is authored by Kayce Basques.

Creative Commons License This work is licensed under a Creative Commons Attribution 4.0 International License.