mercredi 7 février 2018

Can I use content-type application/octet-stream for all response?

Hi I have a downloadHandler in my application witch can send binary data to client I want to know is it better to use content-type application/octet-stream for all of response types(Pdf, Excell, Text, ...) or need to be specified? for example witch one is better?

Response.AddHeader("content-disposition", "a.pdf");
Response.ContentType = "application/octet-stream";

or

Response.AddHeader("content-disposition", "a.pdf");
Response.ContentType = "application/pdf";

if there is difference between them what is advantages and disadvantages of it? thanks a lot.




Aucun commentaire:

Enregistrer un commentaire