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!

About the Author

Kevin Leary is a freelance web developer in Boston, MA specializing in enterprise WordPress development, conversion optimization and JavaScript development.