🆚 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 #2
Browser APIs › Rank #3

Popularity

Determined by the number of sites using each technology.

The Fetch browser API is as popular as XMLHttpRequest.
Total websites

Market share

Browser APIs

Popularity by country

Determined by the number of sites detected from each country.

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

Awards

Popularity by domain category

Determined by the number of sites in each category.

Fetch is more popular among sites focused on business, marketing and merchandising, and blogs and wiki, while XMLHttpRequest is more commonly used on online shopping, fashion and beauty, and entertainment 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
xhamster.com
#24
View more ➝
Name
Rank
p**nhub.com
#26
View more ➝

See also

🗃️ About This Data