If you develop a website locally, you do not necessarily use an SSL certificate. Unfortunately, this blocks certain features, such as geolocation. Here's how to work around the problem.
Permission change for geolocation is locked to browsers: the option is simply not editable. You have to go through the hidden options of each browser (Chrome, Opera, Firefox) to authorize it.
On Opera, the console displays the following message: "[Deprecation] getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."
On Chrome, the console displays the following message: "[Deprecation] getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details."
The error displayed in the Firefox console is "A geolocation request can only be fulfilled in a secure context.".
Unfortunately, no option is currently offered to allow local geolocation. And even if we managed to activate it (as in the screenshot opposite), it doesn't work.
RSS | Informations |