Search code examples
htmlgeolocation

How to use Geo Location on http Website (HTML + Javascript)


I'm developing a website with http protocol, but when I wanted to use Geo Location, I got this error:

A geolocation request can only be fulfilled in a secure context.

Now I wanted to ask if it is possible to do a Location request without https.

PS: It might also be my browser (Firefox) blocking this.


Solution

  • In one word, privacy! Location data is particularly sensitive. Restricting geolocation to secure sites helps protect users from unauthorized access to their data. Quite a few sites are likely to break with this change, but Google engineers have expressed that they’d rather see a few (hundred? thousand?) angry emails than see geolocation privacy leaks.

    You can always get free ssl certificates.