getCurrentPosition() Doesn't Just Check — It Prompts
javascript
dev.to
You're building a "find stores near you" banner. The right move, UX-wise, is to explain why you want the visitor's location before the browser's blunt little system dialog interrupts them — but only if that dialog hasn't already fired. If they already said yes, just get the location and skip the banner. If they already said no, don't ask again; show a manual city picker instead. So before you render anything, you write a quick check: has this visitor already decided? navigator.geolocation.ge