kidlj
V2EX  ›  问与答

请问如何告知浏览器直接打开纯文本文件(.asc 签名文件)

  •  
  •   kidlj · Jan 30, 2015 · 3224 views
    This topic created in 4311 days ago, the information mentioned may be changed or developed.
    现在点击该文件链接,浏览器提示下载保存。怎样让浏览器直接打开查看呢?

    像是这样的一个文件: https://security.freebsd.org/advisories/FreeBSD-SA-15:03.sctp.asc
    4 replies  •  2015-01-30 18:03:38 +08:00
    bugmenott
    bugmenott
    Jan 30, 2015
    1
    chrome表示打开链接即看,未提示下载
    kidlj
    kidlj
    OP
    Jan 30, 2015
    2
    @bugmenott 对,我就是想在自己的网站里提供这种体验。
    banbanchs
    banbanchs
    Jan 30, 2015❤️1
    3
    @kidlj 设置一下content-type:text/plain应该就好了
    Fechin
    Fechin
    Jan 30, 2015❤️1
    4
    Response Headers

    content-type:text/plain
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2208 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 14:52 · PVG 22:52 · LAX 06:52 · JFK 09:52
    ♥ Do have faith in what you're doing.