I have a problem with ajax (and / or jQuery ajax) and status 302.
Here is what I am trying:
var xhr = new XMLHttpRequest(); xhr.open("GET", 'some_page_that_I_cant_change.php'); xhr.onreadystatechange = function(){ console.log(xhr.readyState, xhr.status); }; xhr.send(null);
some_page_that_I_cant_change.php redirects the .bin code with the 302 code. I do not want to download this file, I just want to find out the path to the file. Example:
./some_page_that_I_cant_change.php ./path/to/bin/file.bin << I wan't only this path as string
The problem is that Chrome automatically redirects the file without telling me the path to the script. Is there a workaround for this?
source share