Hacker News new | past | comments | ask | show | jobs | submit login

Websites like Imgur are able to detect whether the browser is requesting the image as a part of an <img> tag or a separate document by sniffing the Accept header.

So when a direct Imgur image link is opened in its own tab, Imgur can redirect to a webpage if it feels like it. In Firefox, by changing about:config value "image.http.accept" to

  */*
it's possible to avoid this behavior and it will load exactly what you asked for.

I never quite understood why do browsers let a webserver know the context you're loading the requested resource in, for privacy's sake.




Thanks for the info: I didn't know about this one. Fortunately `image.http.accept` already defaults to this in Firefox 54.0.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: