The Fetch API, Mozilla hopes, will "[nail] down the semantics of a user agent fetching a resource," offering a solution to these issues in the process.
Fetch consists of three interfaces, Headers, Request and Response, each of which is aligned to the same basic HTTP concepts. As its name suggests, the Headers interface describes the headers associated with an HTTP request, and in the context of a request, a Headers object can be used by a developer to specify custom headers. The Request interface describes a request to retrieve a resource over HTTP. This includes the URL and method.
Combined with ServiceWorker, Marathe says, the Fetch API will further the goals of the Extensible Web Manifesto and help developers build better offline experiences. But it's not quite ready for prime time and still trails XHR in some areas. Specifically, developers cannot abort fetches or track fetch progress — deal-breakers for some applications.
Those issues are being addressed, and developers eager to start experimenting with the Fetch API can do so using the nightly and dev builds of Firefox 39 and Chrome 42. Developers are also encouraged to contribute to the development of the Fetch API through the WHAT Working Group.