You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After granting location permissions to the Geolocation API, it will request permissions again when you refresh the page. This phenomenon is occurring on iOS.
#422
Closed
LeeSangUk2 opened this issue
Oct 26, 2023
· 3 comments
If you refresh the page after initially granting location permissions, you will be prompted for location permissions again and will need to grant permission again. Currently this only occurs on iOS. Is there a way?
The tested iOS versions are 16.2 and 17.
This is the code implemented when retrieving location information.
<script>
var options = {
timeout: 15000,
enableHighAccuracy: true,
maximumAge: 86400000,
};
function success(pos) {
var crd = pos.coords;
alert('Your current position is:');
alert(`Latitude : `+crd.latitude);
alert(`Longitude: `+crd.longitude);
};
function error(err) {
alert(`ERROR(): `+err.message);
};
navigator.geolocation.getCurrentPosition(success, error, options);
</script>
The text was updated successfully, but these errors were encountered:
(Please note that this is not a support forum.) The geolocation permission on iOS is one-time by default. If you go to Settings and then Safari, you can toggle "Location Access On All Websites" between "Ask" (default), "Deny", and "Allow".
If you refresh the page after initially granting location permissions, you will be prompted for location permissions again and will need to grant permission again. Currently this only occurs on iOS. Is there a way?
The tested iOS versions are 16.2 and 17.
This is the code implemented when retrieving location information.
The text was updated successfully, but these errors were encountered: