Geolocation API cautions

Location data can reveal sensitive information, so a useful geolocation feature needs clear consent, limited collection, and a safe fallback.

What you will learn

Before requesting

After receiving a position

When permission is denied

Explain what the user can still do: enter a place manually, choose from a list, or continue with reduced functionality. Never repeatedly prompt without a clear user action.