We can break a large task into pieces and work them out easily. This way you can divide a large server side task into small multiple tasks. For example if you need to send 1000 emails at a time, there may be inconveniences to perform this large task like time out or cpu overload etc. For this reason you may break the mailing list in chunks 50 emails per list or whatever you prefer. Then you can run the script 2o times to finish your job. This can be done using AJAX. I have created an example to demonstrate this.