Part 3 of JavaScript Web APIs Series Covers Web Workers, Fetch, and Geolocation

This third installment of a series on essential Web APIs builds on earlier parts that covered the Web Forms, Web History, and Web Storage APIs. It introduces Web Workers, which run JavaScript in a background thread so tasks don't block the user interface, and includes a sample that starts a worker and receives periodic messages. The article then explains the Fetch API as a more flexible alternative to XMLHttpRequest for retrieving JSON or HTML over the network, with an example fetching data from a placeholder API. Finally, it covers the Web Geolocation API, which lets web apps access a device's position, including latitude, longitude, speed, and accuracy, for use in location-aware applications.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in