<i id='4iHjA'><tr id='4iHjA'><dt id='4iHjA'><q id='4iHjA'><span id='4iHjA'><b id='4iHjA'><form id='4iHjA'><ins id='4iHjA'></ins><ul id='4iHjA'></ul><sub id='4iHjA'></sub></form><legend id='4iHjA'></legend><bdo id='4iHjA'><pre id='4iHjA'><center id='4iHjA'></center></pre></bdo></b><th id='4iHjA'></th></span></q></dt></tr></i><div id='4iHjA'><tfoot id='4iHjA'></tfoot><dl id='4iHjA'><fieldset id='4iHjA'></fieldset></dl></div>

        <legend id='4iHjA'><style id='4iHjA'><dir id='4iHjA'><q id='4iHjA'></q></dir></style></legend>
        <tfoot id='4iHjA'></tfoot>
          <bdo id='4iHjA'></bdo><ul id='4iHjA'></ul>

        <small id='4iHjA'></small><noframes id='4iHjA'>

      1. Content-Disposition:“inline"和“inline"有什么区别?和“附件&qu

        时间:2023-10-25

        <small id='ohZ3u'></small><noframes id='ohZ3u'>

        <i id='ohZ3u'><tr id='ohZ3u'><dt id='ohZ3u'><q id='ohZ3u'><span id='ohZ3u'><b id='ohZ3u'><form id='ohZ3u'><ins id='ohZ3u'></ins><ul id='ohZ3u'></ul><sub id='ohZ3u'></sub></form><legend id='ohZ3u'></legend><bdo id='ohZ3u'><pre id='ohZ3u'><center id='ohZ3u'></center></pre></bdo></b><th id='ohZ3u'></th></span></q></dt></tr></i><div id='ohZ3u'><tfoot id='ohZ3u'></tfoot><dl id='ohZ3u'><fieldset id='ohZ3u'></fieldset></dl></div>

                <tbody id='ohZ3u'></tbody>
              1. <legend id='ohZ3u'><style id='ohZ3u'><dir id='ohZ3u'><q id='ohZ3u'></q></dir></style></legend>

              2. <tfoot id='ohZ3u'></tfoot>
                • <bdo id='ohZ3u'></bdo><ul id='ohZ3u'></ul>

                • 本文介绍了Content-Disposition:“inline"和“inline"有什么区别?和“附件"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  两者有什么区别

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

                  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.

                  推荐答案

                  因为当我使用一个或另一个时,我得到一个窗口提示,要求我下载他们两个的文件.

                  Because when I use one or another I get a window prompt asking me to download the file for both of them.

                  此行为取决于浏览器和您尝试提供的文件.使用内联,浏览器会尝试在浏览器中打开文件.

                  This behavior depends on the browser and the file you are trying to serve. With inline, the browser will try to open the file within the browser.

                  例如,如果您有一个 PDF 文件和 Firefox/Adobe Reader,内联处置将在 Firefox 中打开 PDF,而附件将强制下载.

                  For example, if you have a PDF file and Firefox/Adobe Reader, an inline disposition will open the PDF within Firefox, whereas attachment will force it to download.

                  如果您提供 .ZIP 文件,浏览器将无法以内联方式显示它,因此对于内联和附件配置,将下载该文件.

                  If you're serving a .ZIP file, browsers won't be able to display it inline, so for inline and attachment dispositions, the file will be downloaded.

                  这篇关于Content-Disposition:“inline"和“inline"有什么区别?和“附件"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在 ASP.NET MVC 中返回文件以查看/下载 下一篇:在 ASP.NET 中获取 HTTP 引荐来源网址

                  相关文章

                    <small id='qMCzU'></small><noframes id='qMCzU'>

                    <i id='qMCzU'><tr id='qMCzU'><dt id='qMCzU'><q id='qMCzU'><span id='qMCzU'><b id='qMCzU'><form id='qMCzU'><ins id='qMCzU'></ins><ul id='qMCzU'></ul><sub id='qMCzU'></sub></form><legend id='qMCzU'></legend><bdo id='qMCzU'><pre id='qMCzU'><center id='qMCzU'></center></pre></bdo></b><th id='qMCzU'></th></span></q></dt></tr></i><div id='qMCzU'><tfoot id='qMCzU'></tfoot><dl id='qMCzU'><fieldset id='qMCzU'></fieldset></dl></div>
                      <bdo id='qMCzU'></bdo><ul id='qMCzU'></ul>
                  1. <tfoot id='qMCzU'></tfoot>
                  2. <legend id='qMCzU'><style id='qMCzU'><dir id='qMCzU'><q id='qMCzU'></q></dir></style></legend>