jQuery.ajax() uses current page URL instead of specified URL -


if make call on page such index.php:

jquery.ajax("keepalive.php"); 

jquery makes request index.php instead of keepalive.php.

this request keep session going, don't care result. according the docs, specifying url needed. thoughts on why doesn't work correctly?

your code work if you're using jquery >= 1.5. maximum compatibility, use following:

jquery.ajax({     url: 'keepalive.php' }); 

this code run in jquery version. hope helps.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -