🆚 Fetch vs. XMLHttpRequest

Type

Browser API
Browser API

About

Fetch is a modern JavaScript API for requesting network resources and exchanging data between web applications and servers.

It provides a promise-based interface for asynchronous HTTP requests, supports streaming request and response bodies, works with service workers, and can handle data formats such as JSON, text, blobs, and binary content.

Read more…

XMLHttpRequest (XHR) is a JavaScript API for sending HTTP and HTTPS requests and receiving data from web servers without reloading the current page.

It supports both synchronous and asynchronous communication, allows monitoring of upload and download progress, and can exchange data in formats such as text, XML, JSON, and binary content.

Read more…

Headquarters

Cambridge, Massachusetts, United States
Cambridge, Massachusetts, United States

Website

Categories

Browser APIs › Rank #3
Browser APIs › Rank #2

Popularity

Determined by the number of sites using each technology.

The XMLHttpRequest browser API is 1.3 times more popular than Fetch.
Total websites

Market share

Browser APIs

Popularity by country

Determined by the number of sites detected from each country.

XMLHttpRequest is more popular in the United States, Germany, and the United Kingdom, while Fetch is more popular in India, Brazil, and Spain.
United States
Germany
United Kingdom
India
Russia
Canada
France
Australia
Japan
Netherlands

Awards

Popularity by domain category

Determined by the number of sites in each category.

XMLHttpRequest is more popular among sites focused on online shopping, business, and marketing and merchandising, while Fetch is more commonly used on Internet services, general news, and travel sites.
Online Shopping
Business
Marketing/Merchandising
Fashion/Beauty
Blogs/Wiki
Internet Services
Education/Reference
Entertainment
General News
Travel

Top sites

Top-ranked sites that use these technologies.

Name
Rank
#12
View more ➝
Name
Rank
p**nhub.com
#26
#39
View more ➝

See also

🗃️ About This Data