GiveToken / GiftBox

Repository for Sizzle
0 stars 0 forks source link

AJAX async deprecated message on console #1118

Closed shreydesai closed 8 years ago

shreydesai commented 8 years ago

Description

There are a couple of AJAX calls where the async parameter is set to false. Whenever these AJAX calls go through, this message on the console appears:

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental
effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.

This is intuitive because the "A" in AJAX is asynchronous.

Steps to reproduce

Run an AJAX call with the async parameter set to false:

$.ajax({
  type: 'GET',
  async: false,
  error: function(xhr, status, err) {
    console.error(err);
  }
)};

Location (computer/mobile)

Mac OS X, Chrome

wogsland commented 8 years ago

cf. #851