2

In recent questions related to SPServices

I see people use the

async:false

option.

Is there an issue with the default async:true behaviour I need to become aware of?
or is this an example of people copy/pasting code without understanding what is going on?

SPServices documentation

async

By default, all of the Web Service operations are called asynchronously with AJAX. Generally, this will be the desired approach, but to force synchronicity, add the async: false option.

In layman's terms:

If you set async:false your script will block processing of the rest of the page until the whole (SPservices) script has finished. Effectivly making the download/processing of the whole page a lot longer.

If you set async:true (or leave out this line, because it is the default setting) your script will NOT block processing of the rest of the page until the whole (SPservices) script has finished.

So use false only when you really really need it.

1
  • This is more of a discussion than a specific question. Please feel free to edit this to ask something specific and request it to be re-opened, or another option might be to ask it on the SPServices site.
    – SPDoctor
    Sep 22 '15 at 10:48