1

currently my company has webapplications which want to provide services regarding the users current geographical position.

We call the location services this way (standard):

navigator.geolocation.getCurrentPosition( function( position ) {
     var _lat = Math.round( position.coords.latitude * 1000 ) / 1000;
     var _lon = Math.round( position.coords.longitude * 1000 ) / 1000;
     doThis( _lat, _lon ); }, function( error ) {doThat( 0, 0 );} );

When I test my webapplications with different latest-version Browsers and custom settings many Browsers are asking the user too often for the permisson to allow to track his geolocation. Safari asks every time when navigator.geolocation.getCurrentPosition is called, mobile Safari once in a session, Chrome saves the page instantly in the settings and never prompts the user again, mobile Internet Explorer seems to save the permission 24 hours. Is there any way to programmatically trick a browser that he behaves like Chrome (save the permission)? I think it's a little bit annoying and not very userfriendly when a Browser asks to often for this permission, because the user can turn off location tracking anyway if he doesn't want to get tracked and we want to provide userfriendly services.

4

1 に答える 1

0

No, you can't. That part is completely in the domain of the browser and its settings. A user may configure his browser to what he needs, a website should not be able to do that.

于 2012-06-27T23:36:21.627 に答える