I want to use my user's location to do some actions...
The problem is that I don't want to trigger the GeoLocation API popup in case the user hasn't allowed/blocked it, because he'd be confused why I'm asking for it.
So, navigating to mysite.com/page-that-needs-geolocation
, what should happen is:
mysite.com/why-enable-geolocation
) in case he hasn't allowed/blocked the GeoLocation, and ask for the permission there.mysite.com/enter-your-position
) in case he has blocked the GeoLocation.mysite.com/page-that-needs-geolocation
), and use his geolocation.I'm aware of Permission API, but it's super limited to modern browsers and I can't have that.
Is there a different approach to this problem or another API I can use?
This is currently not possible, due to browser limitations.
Canceling (dismissing) or denying permission will lead to the same result, even though you can re-trigger a new permission request in a new session, if the user dismissed the popup.