Uses of content-disposition in an HTTP response header

后端 未结 6 458
旧巷少年郎
旧巷少年郎 2020-11-22 11:09

I have found the following asp.net code to be very useful when serving files from a database:

Response.AppendHeader(\"content-disposition\", \"attachment; fi         


        
6条回答
  •  心在旅途
    2020-11-22 11:49

    Well, it seems that the Content-Disposition header was originally created for e-mail, not the web. (Link to relevant RFC.)

    I'm guessing that web browsers may respond to

    Response.AppendHeader("content-disposition", "inline; filename=" + fileName);
    

    when saving, but I'm not sure.

提交回复
热议问题