#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Posts
    33
    Rep Power
    4

    Geolocation needs to be repeated.


    I have a web site that will primarily be used as a mobile web app but could also be usable on laptops and such. One of the key functionalities of this site would be giving the user their location in near real-time (probably 1-5 second delay between updates). Chrome seems to be ok with this, asking you once and then leaving you alone, Firefox however asks you every time it updates. I havent tried it on my iPhone yet but perhaps Safari will act differently too.

    So my question is, is there a way to tell the browser (every browser) to ask once and remember that the user allowed location services?
  2. #2
  3. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Posts
    1,123
    Rep Power
    119
    This is built in browser security and I do not think you can circumvent it. I think the end user, must disable these prompts, in their browser options, to prevent them from occurring. Here is some further reading:

    Geolocation API Specification - Security And Privacy Considerations

    Edit: The only possible way, that I can think of... that you "may" get around it; is using JSON/JSONP.
    Last edited by web_loone08; March 5th, 2013 at 10:24 PM.

IMN logo majestic logo threadwatch logo seochat tools logo