Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

How Facebook downloads images, when you click "Download" near the picture? I see, that they are passing some argument:


,but how it is managed 'behind the scenes'?

share|improve this question

1 Answer 1

When the dl GET variable is set, Facebook's servers add the Content-Disposition: attachment header.

See RFC 2616 for details on the Content-Disposition header.

share|improve this answer
so when I request, it is not picture, but site with extension .jpg? Or it can be done some other way? – Dupadupa Aug 31 '11 at 7:14
@Maciekp In each case your browser is being provided with the same JPG image - the Content-Disposition header simply tells your web browser to download it instead of display it inline. – Jacob Hume Aug 31 '11 at 17:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.