[Solved] How to send current URL in JavaScript?


You don’t need to send it, if you’re looking to have access to the name of the file the AJAX call was sent from in the php file that receives the request, you can use

$_SERVER['HTTP_REFERER']; 

Which is useful if you’re going to be receiving requests to that file from multiple locations.

0

solved How to send current URL in JavaScript?