We've build (a simple) prototype for a local weather based API in a webpage. The Javascript is as following. Function weather() is AJAX to get stuff from 3rd party API.
navigator.geolocation.getCurrentPosition(function (data) {
weather(data, duration)
});
All working like a charm but unlike the desktop where a visitor can tick the option 'Always grant location access' this is not available in mobiles (iPhone). In practise this leads to a JS Alert asking permission every time you visit this pages anew. During a session you are not asked again. Does anyone know how to avoid this?
PS: the iPhone used for testing has the setting 'Location for Safari' on 'Ask'. Not 'Grant always' obviously.