简单的HTML锚问题 [英] simple html anchor question
本文介绍了简单的HTML锚问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您如何下载mp3链接而不是播放浏览器中"
how do you make an mp3 link download instead of play "in-browser"
试图将目标更改为空白,但这只是在新窗口中打开了播放器
tried changing the target to blank but that just opened the player in a new window
推荐答案
您不能通过修改链接来做到这一点.您必须让提供文件的HTTP服务器发送应用程序/八位字节流"的 Content-Type
.大概它正在发送类型"audio/mpeg",这向浏览器暗示它是MP3内容.没有更改此标头的能力,您将无法实现.
You can't do this by modifying the link. You will have to have the HTTP server that serves the file send a Content-Type
of "application/octet-stream". Presumably it is sending the type "audio/mpeg", which is hinting to the browser that it is MP3 content. Without the capacity to alter this header, you can't achieve this.
这篇关于简单的HTML锚问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文