Why is die() used at the end of function that handles an Ajax request?
If you do not die, execution will continue and might generate extra output which might break whatever information you are trying to send from the server to the browser. Strictly speaking, you might not need to die, but there is very little point in taking the risk. In more general terms, WordPress Ajax shows its … Read more