-2

When I open the following url in browser, http://pages.ebay.com/link/?nav=item.view&id=141628727383&alt=web

It redirects to a different url http://www.ebay.com/itm/141628727383

What's the mechanism?

jiawen
  • 1,198
  • 2
  • 17
  • 29

1 Answers1

1

Because it uses some kind of JS redirection:

var eULin;
window.onload = function() {
    eULin = new eUL();
    eULin.version = '1.4.1+1424198141014';
    eULin.redirect();
}

eUL is defined in http://pages.ebay.com/link/univlink.min.js

eUL.prototype.redirect calls eUL.prototype.winRedirect, which calls location.replace. That replaces the current page with a new one, in a way that the current one won't be accessible using the back button.

Oriol
  • 274,082
  • 63
  • 437
  • 513
  • I am using jsoup to retrieve the content of the website. Is there a way to detect url that uses such kind of redirect technique and retrieve the redirected url? – jiawen Apr 18 '15 at 20:36