There seems to be no general wisdom here, but if you want to test it, try loading the script using jQuery ajax:
var redirected = false; $.ajax({ url: url, dataType: "script", statusCode: { 302: function() { redirected = true; } }, success: function () { if (redirected) {
note that the script will already be running by the time the success function is received, so it can be useless even if it works.
source share