Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 141247

Remember GPS permission state

$
0
0

I'm working with GPS location function and the problem is that the permission popup is coming over and over again (each new url refresh / F5 key press).

How can I remember the state that the user has chosen in his browser (APPROVED or DECLINED).

if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(function (position) {
        dispatchResponse(requestId, position.coords);
    });
}
else {
    return "No location finding";
}

Would be great if someone could give me a hint.

Thx!


Viewing all articles
Browse latest Browse all 141247

Trending Articles