Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I set the "HTML" Title of a PDF file served by my Apache Web server

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?

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.

like image 305
Zhami Avatar asked Apr 14 '11 18:04

Zhami


1 Answers

Here is an http header you can set.

Content-Disposition:inline; filename="*File name you want*";
like image 189
John S Avatar answered Sep 21 '22 18:09

John S