How to Reset a Geolocation Prompt in Google  Chrome

Steps to reset geolocation prompt's in Google Chrome, useful for for testing navigator.geolocation.getCurrentPosition() usage in Chrome.

This should have been easier to solve then it was, so I thought I’d post it here for anyone else looking for a way to reset a geolocation prompt in Google Chrome.

Open Location Privacy Settings

Open the Chrome > Preferences > Settings > Privacy > Content settings… > Location panel in Chrome, or copy and paste this URL into your browser:

chrome://settings/contentExceptions#location

Remove Hostname Patterns

Then you just remove the hostname patterns that you want to reset:

  1. Find the site you want to reset under Hostname pattern
  2. Hover over the site and click the “×” icon that appears on the right hand side of the table row.

All done!

That’s it! Hopefully this helps someone else out there reset a geolocation prompt in Google Chrome. This is very useful for testing navigator.geolocation.getCurrentPosition() usage in Chrome.

Unfortunately it’s not possible to automate though so it can be difficult to work with this and a test runner. If anyone else has a solution that works well with automated testing please post a comment, I’d love to hear about it!

Meet the Author

Kevin Leary, WordPress Consultant

I'm a custom WordPress web developer and analytics consultant in Boston, MA with 17 years of experience building websites and applications. View a portfolio of my work or request an estimate for your next project.