2 ms·
kind of. it's not done on the front end (js) but rather using some service on the backend. the phrasing of that is a bit weird, but they probably test until th
by treyp 16y ago
kind of. it's not done on the front end (js) but rather using some service on the backend.
the phrasing of that is a bit weird, but they probably test until they no longer get a 301 or 302 redirect and save the result. they print this result on the front end as a title for the link and as an HTML5 data attribute "expanded-url" on the link.
- jluxenberg 16y agoI looked at doing this using Javascript in a browser extension a while ago, and it's actually not possible to do for a couple of reasons: 1) XHR cross domain policy prohibits requests to domains other than the domain the page loaded from 2) the XHR GET method always follows a 301 redirect and returns the content at the URL. The full URL is not made available.
- RyanMcGreal 16y agoYou'd have to write something on your server that does this, and expose it to your client JS via a local URL.