ブックマーク / www.gaunt.dev (1)

  • Fetch is the new XHR

    Fetch is the new XHRfetch(), defined in the Fetch API, is a new API which allows you to make requests similar to XHR’s, but has a simpler / friendly API. The Fetch API is available in service workers today and in the global space (a.k.a in the normal Chrome window) if you enable the Experimental Web Platform Features in chrome://flags. After getting asked about how to make an XHR for push notifica

    Fetch is the new XHR
    tak0303
    tak0303 2015/02/14
    “You can overcome this issue by setting the mode of the request to no-cors. This basically tell's the browser that it's still ok to get the asset despite the server not supporting CORs, however, the response type will be opaque for these responses, meaning you won't be able to examine the response
  • 1