How to stop a jQuery called php function when user clicks link
I'm using jQuery to call php functions. This works fine except that when a user clicks on a link (if the PHP function hasn't completed executing), the new page will not start loading until t开发者_Go百科he PHP function finishes.
Is there a setting in jQuery I need to change?
Are you using session handling in your PHP code?
If 2 PHP processes are running using the same session, one process will block (wait) until the second one finishes.
Try calling session_write_close() as soon as possible to prevent this from happening.
See http://php.net/manual/en/function.session-write-close.php for more details.
精彩评论