PositionOptions.maximumAge

Estás leyendo la versión en inglés del artículo porque aún no existe una traducción para este idioma. ¡Ayúdanos a traducir este artículo!

Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The PositionOptions.maximumAge property is a positive long value indicating the maximum age in milliseconds of a possible cached position that is acceptable to return. If set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position. If set to Infinity the device must return a cached position regardless of its age.

Syntax

positionOptions.maximumAge = timeLength

Specifications

Specification Status Comment
Geolocation API
The definition of 'PositionOptions.maximumAge' in that specification.
Recommendation Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
maximumAgeChrome Full support 5Edge Full support YesFirefox Full support 3.5IE Full support 9Opera Full support 16
Full support 16
No support 10 — 15
Safari Full support 5WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 4Opera Android Full support 16
Full support 16
No support 10.1 — 14
Safari iOS Full support YesSamsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown

See also