我可以设置“HTML”吗?我的Apache Web服务器提供的PDF文件的标题 [英] Can I set the "HTML" Title of a PDF file served by my Apache Web server

查看:112
本文介绍了我可以设置“HTML”吗?我的Apache Web服务器提供的PDF文件的标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的HTML页面包含< a>带有指向PDF文件的href的标签。我的Apache Web服务器很好地为它们提供服务,但是浏览器历史记录中显示的标题是文件名。我希望能够设置该标题。

I have HTML pages that contain <a> tags with hrefs that point to PDF files. My Apache Web server serves them just fine, but the title, as shown in the Browser history, is of the file name. I would like to be able to set that title.

也许有一个标题可以设置?

Perhaps there's a Header than can be set?

我不想写一个脚本来提供服务文件,因为服务器可以处理Content-Encoding协商(例如,对于gzip),并且做流量控制,没有我想重新创建。

I don't want to write a script to serve the files as the server can handle Content-Encoding negotiation (e.g., for gzip), and do flow control, none of such do I want to re-create.

推荐答案

这是你可以设置的http标题。

Here is an http header you can set.

Content-Disposition:inline; filename="*File name you want*";

这篇关于我可以设置“HTML”吗?我的Apache Web服务器提供的PDF文件的标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆