How can we make append wait until the previous append is complete. I am appending huge amount of data so the present append should check if the pre
append
Perhaps another way might have been to simply check whether the length of the innerHTML of the container you're appending to equals the length of the last chunk of content, within your polling function.
If not dont append, if so append.