RE: Drop lastPosition from Geolocation?

Just to be even clearer:  This is not suggesting that cached positions must be used to service a request that includes this new option.

(After a permission check) The behaviour should be:

- If a sufficiently “fresh” cached position is available (according to the value of this new parameter), then that can be used.
- else positioning is attempted.

~ If positioning is unsuccessful, this is reported (the cached location might be included in the error callback, but I have a different proposal below).

What I am getting from Andrei’s proposal is that cached information is only used as a backup.  That is, it is solving an availability problem.  That being the case, it doesn’t achieve the typical goal I attribute to location caching, which is avoiding excessive hits on the thing that does the measurement.

I guess that there are two different goals in this discussion.  I look at caching as a way to address a problem with overloading; protection of resources and so forth - you don't want a denial of service on your GPS chip from multiple location-aware sites going full-tilt.  It appears that the proposed solution sees caching as a means of addressing availability problems.

Note that with my proposal, you can still achieve the availability goal.  Instead of including a position in the error callback, you include an indication that cached data is available, but it was not “fresh” enough.  Then an application can decide whether or not to use that information in the same way that it would decide to use the backup information.  From that, it can make another request with a larger value in the “modifiedSince”.

Regards,
Martin

~~

- if the page has no permission, errorCallback is invoked with
PERMISSION_DENIED.
- else
* if it doesn't have any cached position, errorCallback is invoked
with POSITION_UNAVAILABLE.
* else
   ** if the cached position is older than 10 mins, errorCallback is
invoked with POSITION_UNAVAILABLE
   ** else successCallback is immediately invoked with the cached position

------------------------------------------------------------------------------------------------
This message is for the designated recipient only and may
contain privileged, proprietary, or otherwise private information.  
If you have received it in error, please notify the sender
immediately and delete the original.  Any unauthorized use of
this email is prohibited.
------------------------------------------------------------------------------------------------
[mf2]

Received on Wednesday, 19 November 2008 19:01:57 UTC