Sunday, 18 August 2013

Return redirect url sing jquery (javascript)

Return redirect url sing jquery (javascript)

I need to get the redirect url's for a list of 100 websites using
javascript. For example wnbc.com is redirected to nbcnewyork.com. So this
code below should return "nbcnewyork.com"
$.ajax({
type: "POST",
url: "http://www.wnbc.com",
dataType: "script",
success: function (data, textstatus, xhrreq) {
alert('You are now at URL: ' + xhrreq.getResponseHeader());
}
});

No comments:

Post a Comment