DEV Community

Discussion on: How to Check a User's Location with JavaScript

Collapse
 
msucorey profile image
Corey Wofford

Yeah basically you want to get in front of the browser's location permission dialog twice - first of all the timing (don't ask location permission until you need it), second of all by informing the user first why you'll be asking (how will this enhance their experience). If they tell YOU no, but not the browser, you can record that in preferences and then hand off to the browser later if they choose to enable.