开发者

How to stop a jQuery called php function when user clicks link

开发者 https://www.devze.com 2023-02-20 03:59 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消