• Hello

    I notice today a problem in geolocation only on IOS and only on Safari.

    I have maps (maps marker plugin) and another geolocation plugin (facetwp). Now, on safari on my iphone 6S (but the problem is general, on other iphone/safari), i find a error message : gelocation denied.

    I have no problem on chrome, on safari macbook.

    Somebody knows this problem ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • @patdechat,

    I had this issue with a client site just last week.

    In my case, the latest Safari blocked geolocation over insecure (ie non-HTTPS) connection.

    To solve this problem I had to transfer the client’s site to my own servers and configure SSL to serve the site over HTTPS (the client’s host had a crazy fee for a simple domain-validated SSL which should be free in 2017).

    So turn on HTTPS if you’re not doing so already. And make sure there are no mixed content issues at all — else Safari will still block geolocation.

    Thread Starter patdechat

    (@patdechat)

    Thank you George

    My site is still in https, from few months.
    But I will se with my hoster, because I regeneratde my SSL because i wanted to add a new site (multisite). Maybe, that is the problem.

    What do you mean with “And make sure there are no mixed content issues at all — else Safari will still block geolocation” ?

    @patdechat,

    If you don’t mind, post a link to your site so I can take a look and test it from my end.

    What do you mean with “And make sure there are no mixed content issues at all — else Safari will still block geolocation” ?

    Mixed content occurs when the page itself is fetched over HTTPS, but some elements on the page (eg images, JavaScript files, CSS files, etc) are not fetched over HTTPS.

    Let’s say you have the HTTPS page:

    https://www.example.com/contact.html

    But on this page, you have included an image with the non-HTTPS URL:

    https://www.example.com/cute-cat.jpg

    So we have a mixture of HTTP and HTTPS content, hence “mixed” content.

    The latest versions of Safari will block geolocation in this case as well.

    • This reply was modified 7 years, 7 months ago by George Appiah.
    Thread Starter patdechat

    (@patdechat)

    Hello

    You can see the problem on the home page for instance : https://myflamm.fr

    My site is in https for months, so i don’t think it is the reason of the probem.

    @patdechat,

    From your original post:

    I notice today a problem in geolocation only on IOS and only on Safari.

    This is what got me thinking of HTTPS issue, as I had a similar issue recently. But in your case, the problem is not only in iOS on Safari as you said. The “problem” if it can be called a problem at all, exists in all browsers.

    When the page loads, the user is prompted to grant location access for geolocation.

    If the user DENIES the request, the browser shows the prompt you’re reporting as a problem. Here’s Firefox on Windows:

    And here’s Chrome on Windows:

    I saw similar thing iOS (Chrome and Safari) and Android (Chome, Opera and Firefox) — so it’s definitely not a Safari on iOS issue as you originally reported.

    Note that if the user denies the request the first time, the page keeps requesting location access on subsequent opens, but some browsers (eg Chome) will not prompt the user for location again, and will just show the access denied prompt.

    I have no problem on chrome, on safari macbook.

    Chances are, you previously granted location access in those browsers. You can clear your history and see what happens. Also, note that not all the pages on the site request geolocation.

    In all the browsers and on all OSes that I tested, when I grant location access, geolocation works and no error is displayed. But when I deny location access, I get the “denied” prompt.

    So I guess this is the designed behavior and not a bug at all.

    • This reply was modified 7 years, 7 months ago by George Appiah.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Geolocation IOS safari’ is closed to new replies.