Alex Rivera | Logout

Content-Disposition:What are the differences between "inline" and "attachment"?

Asked 2009-09-08T17:13:16.520
295

What are the differences between

Response.AddHeader("Content-Disposition", "attachment;filename=somefile.ext")

and

Response.AddHeader("Content-Disposition", "inline;filename=somefile.ext")

I don't know the differences , because when I use one or another I always get a window prompt asking me to download the file for both of them. I read the specs, but it is clueless.

Edit
Report

1 Answer

36

If it is inline, the browser should attempt to render it within the browser window. If it cannot, it will resort to an external program, prompting the user.

With attachment, it will immediately go to the user, and not try to load it in the browser, whether it can or not.

answered 2009-09-08T17:17:58.537

Your Answer