Hacker News new | ask | show | jobs
by yxlx 3681 days ago
I've seen it. It depends on the referrer. When coming from Reddit, visitors will not be redirected.
1 comments

test link: http://i.imgur.com/PhY2HUP.jpg

is this happening for anyone in thread?

maybe try holding down CTRL and hammering the link to see if it's a probability thing?

I have never seen the behavior being described.

Result: http://i.imgur.com/86BlJiS.png

There does appear to be some kind of heuristic at work here. For example, following the above link results in the traditional behavior for me, but following your link leads to the full imgur page.

EDIT: Ah-ha, figured it out.

1. Click on an i.imgur.com link

2. If it takes you to the full page, right click on the image and click "Open in new tab"

3. The original i.imgur.com link will now take you to the direct image.

Amusing heuristic. After following these steps, I'm unable to reproduce my own screenshot. http://i.imgur.com/PhY2HUP.jpg always takes me to the direct image.

I got redirected only on the first click. Thank god for uBlock Origin.
It still redirects on iOS Safari.
It's not a probability thing, it has to do with the http accept header you are sending.

When you click on a link the browser sends 'html' as http accept header. If you link the image using img src the browser sends 'image' as http accept header.

So if you send image with a small expire header, the server can redirect you to the site, if you click on a link.

Following that link on mobile safari leads to a page that contains ads and comments in addition to the image.
Got redirected on first click, but not on second or third.

I'm not on mobile.

Interesting. The first click brought me to the imgur page but a second click brought me directly to the image.
It redirects if I have a referer. A benefit to blocking them for cross-site requests, I suppose.
huh interesting. the first time it brought me to a page but after that it's direct link
I've never seen imgur redirect either. I suspect it's user-agent related.
Make it HTTPS and the direct link works: https://i.imgur.com/PhY2HUP.jpg (for me, at least).
Nope, same thing. First time I get html, second time the direct link.
Looks like part of it is that after you've visited the direct link once it's served from cache.