XMLHttpRequest is no longer available in Service Workers

Published: | Categories: DOM


The XMLHttpRequest API has been disabled in Service Workers as per the latest spec. Use the Fetch API instead. The Service Worker API is currently enabled only on the Developer Edition (Aurora) and Nightly channels, so the compatibility impact should be minimum.

Update: The Service Worker API has been shipped with Firefox 44, so it’s now available on the Beta and Release channels as well.