W3C Geolocation API: Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
Rescuing orphaned refs ("geolocation-spec-hist" from rev 1205228127)
Bender the Bot (talk | contribs)
 
(One intermediate revision by one other user not shown)
Line 1:
{{Short description|Javascript API to geolocate devices}}
{{Use dmy dates|date=June 2020}}
{{Infobox technology standard
| title = Geolocation API
Line 5 ⟶ 6:
| image =
| caption =
| first_published = {{Start date and age|df=yes|2008|12|22}}<ref name="geolocation-spec-hist">{{Cite web|url=https://www.w3.org/standards/history/geolocation-API|title=Geolocation API Specification 2nd Edition Publication History - W3C|date=n.d.|access-date=2021-04-21}}</ref><ref name="geolocation-spec-20081222">{{cite web|url=https://www.w3.org/TR/2008/WD-geolocation-API-20081222/|title=Geolocation API Specification|first=Andrei (editor, Google Inc.)|last=Popescu|website=W3C|publisher=Geolocation Working Group|date=2008-12-22|access-date=2021-04-21}}</ref>
| first_published = {{Start date and age|2008|12|22}}<ref name="geolocation-spec-hist">{{Cite web|url=https://www.w3.org/standards/history/geolocation-API|title=Geolocation API Specification 2nd Edition Publication History - W3C|date=n.d.|access-date=2021-04-21}}</ref><ref name="geolocation-spec-20081222" />
| version = W3C Recommendation
| version_date = {{Start date and age|df=yes|2022|September09|01}}<ref name="geolocation-spec" />
| preview =
| preview_date =
Line 33:
Web pages can use the Geolocation API directly if the web browser implements it. Historically, some browsers could gain support via the [[Google Gears]] [[plug-in (computing)|plugin]], but this was discontinued in 2010 and the server-side API it depended on stopped responding in 2012.<ref>{{cite web |url=https://code.google.com/apis/gears/api_geolocation.html |archive-url=https://web.archive.org/web/20120214212239/https://code.google.com/apis/gears/api_geolocation.html|title=Geolocation API: Gears API: Google Code |website=Google Code |date=9 July 2009 |archive-date=2012-02-14 |access-date=2021-04-21 }}</ref><ref name="code-google-gear-geo-api" />
 
The Geolocation API is ideally suited to web applications for mobile devices such as [[smartphone]]s. On desktop computers, the W3C Geolocation API works in [[Firefox]] since version 3.5, [[Google Chrome]],<ref>{{cite web |url=httphttps://chrome.blogspot.com/2010/05/new-chrome-stable-release-welcome-mac.html|title=A new Chrome stable release: Welcome, Mac and Linux!|website=Google Chrome Blog |date=25 May 2010 |access-date=2021-04-21 }}</ref> [[Opera (web browser)|Opera]] 10.6,<ref>{{cite web |url=http://my.opera.com/desktopteam/blog/2010/07/01/opera-10-60-goes-final |archive-url=https://web.archive.org/web/20111109061925/http://my.opera.com/desktopteam/blog/2010/07/01/opera-10-60-goes-final|title=Opera 10.60 goes final|first=Huib|last=Kleinhout |work=[[My Opera]] |publisher=[[Opera Software]] |date=2021-07-01 |archive-date=2011-11-09 |access-date=2021-04-21 }}</ref> [[Internet Explorer]] 9.0,<ref>{{cite web|title=W3C Geolocation API in IE9 - IEBlog - Site Home - MSDN Blogs|url=http://blogs.msdn.com/b/ie/archive/2011/02/17/w3c-geolocation-api-in-ie9.aspx|url-status=dead|archive-url=https://web.archive.org/web/20110219033657/http://blogs.msdn.com/b/ie/archive/2011/02/17/w3c-geolocation-api-in-ie9.aspx|author=ieblog|website=IEBlog|date=2011-02-17|archive-date=2011-02-19|access-date=2021-04-21 }}</ref> and Safari 5. On mobile devices, it works on [[Android (operating system)|Android]] (firmware 2.0+), [[iOS (Apple)|iOS]], [[Windows Phone]] and [[Maemo]]. The W3C Geolocation API is also supported by Opera Mobile 10.1 – available for Android and [[Symbian]] devices (S60 generations 3 & 5) since 24 November 2010.<ref>{{cite web|url=http://www.opera.com/press/releases/2010/11/24/ |archive-url=https://web.archive.org/web/20111104005142/http://www.opera.com/press/releases/2010/11/24/|author=Opera.com|title=Opera speeds up Symbian browsing|date=2010-11-25|archive-date=2011-11-04|access-date=2021-04-21 }}</ref> Browsers initially allowed access to the API in insecure contexts, but in the context of Secure Contexts,<ref>{{Cite web |title=Secure Contexts |url=https://www.w3.org/TR/secure-contexts/Overview.html |access-date=2022-10-13 |website=W3.org }}</ref> browsers, e.g., Chrome,<ref>{{Cite web |title=Intent to Remove: Insecure origin usage of geolocation |url=https://groups.google.com/a/chromium.org/g/blink-dev/c/ylz0Zoph76A/m/jaMAcld6BQAJ |access-date=2022-10-13 |website=Groups.Google.com }}</ref> now generally require a secure connection.
 
Google Gears provided geolocation support for older and non-compliant browsers, including Internet Explorer 7.0+ as a Gears plugin, and Google Chrome which implemented Gears natively. It also supported geolocation on mobile devices as a plugin for the Android browser (pre version 2.0) and [[Opera Mobile]] for [[Windows Mobile]]. However, the Google Gears Geolocation API is incompatible with the W3C Geolocation API and is no longer supported.