Ondemand javascript call on window unload using jquery

Posted by sunil-khedar on Stack Overflow See other posts from Stack Overflow or by sunil-khedar
Published on 2010-04-12T12:17:23Z Indexed on 2010/04/12 12:23 UTC
Read the original article Hit count: 287

Filed under:
|
|

Hi All,

I have tried for "unload" and "beforeunload" binding in following code, but none of the browser is sending a request:

$(window).bind('unload', function(){
       $.ajax({cache: false,
        dataType: "script",
            url: "test.php"
        });
    });

Any suggestion?

Thank you.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about AJAX