Re:Show HN: What every browser knows about you
by Capira on Sunday April 03, 2016 @05:23PM
(#11417818)
Though the redirect works only with images hosted on the same domain. The favicon was the only image I could find on twitter.com or facebook.com.
I reported this bug to every company listed there, but all of them said it is not relevant to their users' privacy.
So, the script creates an (invisible) <img> element for every website which points to the login page (which might redirect to the favicon). If it receives an image, the user is already logged in and the onLoad() callback will fire. Otherwise, it will get an HTML page, so the onError() callback will fire.
It could work with any image on the website, not just the favicon.