Geolocation permission

What is a geolocation permission ?

A geolocation permission is a request made to the user via the browser to obtain his geographical coordinates.  As long as the user has not authorized this request, the WEB page cannot obtain this information. If and when it obtains it, it is able to provide more adequate content to the user. This request is initiated using javaScript code : geolocation.getCurrentPosition() or geolocation.watchPosition().

Why is it important to request it with responsibility ?

Faced with a request for geolocation permission without context, i.e. when the page loads, users are confused and distrustful, which alters the trust of the website.

How to implement it correctly

In order to offer a long-lasting experience, it is necessary to remove this request, if it exists, when the page loads and to ask for it during a user interaction, indicating that the action will perform a geolocation request. Finally, it is useful to provide a backup solution if the user refuses it.