Saturday, November 10, 2012

Content-Disposition

Want to download a file instead of rendering in a browser? Append "Content-Disposition:attachment;filename='foo.bar'" to the header. One may also specify "Content-Disposition:inline;filename='foo.bar'" to render the file as usual, yet provide for a default filename in the "Save As" prompt.

This is according to RFC2183 and RFC6266.

No comments:

Post a Comment