Hacker News new | ask | show | jobs
by _ph_ 1601 days ago
I am just wondering what is it that prevents that link to open the image in a browser window but forces a download of it?
3 comments

Specific to Flickr URLs, its the '_d' at the end. Remove it and you can view it normally in the browser. But as danielbln wrote, that 'Content-Disposition' header is what forces a download in general.

https://live.staticflickr.com/65535/51847931721_c3feebd201_o...

Usually it's a HTTP header that's sent to your browser: Content-Disposition: attachment
Or content-disposition as of HTTP/2. Just verified with the browser console that it's sending that header (and using HTTP/2).
Thanks, I had always wondered why some sites behave differently with some file types. A bit annoying, if you just want to glance at something for a while but not keep it around for longer.
There are browser addons that force the browser to ignore this header, for chrome e.g. https://chrome.google.com/webstore/search/undisposition?hl=e....
Probably a courtesy from the website owner to not cause a runaway browser tab as it tries to render 60MB of image.

I mean the first internet-connected computers like the imac g3 had only 32 MB of memory.