This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

maximumAge

Summary

Indicates that the application is willing to accept a cached position whose age is no greater than the specified time (in milliseconds).

Property of apis/geolocation/PositionOptionsapis/geolocation/PositionOptions

Syntax

var result = PositionOptions.maximumAge;
PositionOptions.maximumAge = value;

Return Value

Returns an object of type unsigned longunsigned long

Examples

//10000ms = 10sec
if (PositionOptions.maximumAge < 10000) {
   // The position is relatively recent.
   } else {
   // The position is potentially outdated.
   }

Related specifications

W3C Geolocation Specification
W3C Editor’s Draft

Attributions