Firefox does pick up on Content-Disposition
’s filename
like you want. You can see this by visiting a Wikia image, like https://static.wikia.nocookie.net/metroid/images/d/db/Armcannons.png/revision/latest?cb=20140820011953
, where the supplied filename
is displayed in the tab title.
Unfortunately, Chrome and Safari both display latest
instead, from the last segment of the URL’s path. (Firefox will also do this in the absence of Content-Disposition
.) So if you want this to work in every browser, you may need to append a path segment containing the URL-encoded string you want to display to the end of the URL, and then configure your script/application router/.htaccess
/whatever to ignore that last part when finding the file. For your example, the URL would look something like:
https://example.com/SomeFile.txt/Some%20File
Research dead ends
Link: <>; rel=self; title="Some File"
is the most correct option I found, but doesn’t influence browsers.- Some ancient Windows documentation mentions a
Content-Name
header, but the trail goes cold from there — no RFC seems to mention it. - MIME and Usenet headers used
Subject
for this purpose, but no web browser seems to respect that.