---
title: "What is the difference between synchronous and asynchronous Ajax requests in MVC?"  
description: "What is the difference between synchronous and asynchronous Ajax requests in MVC?"  
author: "Revati S Misra"  
published: 2023-04-18  
updated: 2025-01-08  
canonical: https://www.mindstick.com/forum/157895/what-is-the-difference-between-synchronous-and-asynchronous-ajax-requests-in-mvc  
category: "ajax"  
tags: ["ajax", "jquery", "mvc"]  
reading_time: 2 minutes  

---

# What is the difference between synchronous and asynchronous Ajax requests in MVC?

What is the [difference between synchronous](https://www.mindstick.com/forum/157809/explain-the-difference-between-synchronous-and-asynchronous-code-in-javascript) and [asynchronous](https://www.mindstick.com/blog/178/synchronous-and-asynchronous-command-execution-in-c-sharp-dot-net) [Ajax requests](https://www.mindstick.com/forum/158248/how-do-you-handle-errors-in-jquery-ajax-requests) in [MVC](https://www.mindstick.com/forum/155803/define-cache-profile-in-mvc)?

## Replies

### Reply by Khushi Singh

It is possible to use **[Ajax](https://www.mindstick.com/articles/1541/check-availability-of-user-name-or-email-using-asp-dot-net-ajax-and-jquery) requests** in two modes, namely **synchronous** and **asynchronous** for **MVC (Model – View – Controller) applications.** Here's a detailed explanation of the key differences:

**1. Synchronous Ajax Requests**\
A synchronous request makes the subsequent code wait until the Ajax request has taken place and a response is given.

**Key Characteristics:**\

**Blocking Behavior**: Due to the time taken to send a response, the browser is halted until a reply is received. The users cannot directly engage themselves with the page.

**Execution Order:** The JavaScript execution is blocked until the request and its response is obtained.

**Deprecated:** Indeed, in the current environment of development based on JavaScript, it is generally recommended not to use synchronous AJAX calls because they are very time consuming and have a poor usability.

**Use Case**: Sometimes nonexistent ; May be useful for old code or any case where one want to make sure a certain part of code is run before another part.

## Example:

```javascript
$.ajax({ url: '/Home/GetData', type: 'GET', async: false, // Synchronous success: function (data) { console.log('Response:', data); } }); console.log('This will wait for the Ajax call to complete.');
```

**2. Asynchronous Ajax Requests**\
Unlike synchronous request an asynchronous request does not pause the flow of the subsequent code. This request is an HTTP request that is being passed to the server and the rest of the code in the browser is run during the waiting for the HTTP response.

## Key Characteristics:

\
**Non-Blocking Behavior**: Interactivity of the page is possible while the particular request is being processed.

**Execution Order**: It uses asynchronous Ajax call that means there is another equivalent function that awaits the result of the response.

**Preferred Approach**: Used in contemporary applications to enhance the speed of the application, the accuracy and ease of the application to be used by the customers.

**Use Case**: Primarily suitable for almost all situations particularly where quick response is expected.\

## Example:

```javascript
$.ajax({ url: '/Home/GetData', type: 'GET', async: true, // Asynchronous (default behavior) success: function (data) { console.log('Response:', data); } }); console.log('This will execute without waiting for the Ajax call.');
```

hope it helps!!


---

Original Source: https://www.mindstick.com/forum/157895/what-is-the-difference-between-synchronous-and-asynchronous-ajax-requests-in-mvc

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
