Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filename*=UTF-8''... #2007

kengruven opened this issue Oct 6, 2015 · 2 comments

filename*=UTF-8''... #2007

kengruven opened this issue Oct 6, 2015 · 2 comments


Copy link

@kengruven kengruven commented Oct 6, 2015

When letting a user download a file, you can put a "filename=" in the content-disposition field to suggest to the client what to save it as.

It looks like this field is somewhere between "not fully specified" and "not consistently implemented", especially for non-ASCII encodings.

I think RFC-6266 says that something like this should work:


where blahblahblah is UTF-8-encoded text. (That's two adjacent single-quotes at the start, not an un matched double-quote.)

But there are also apparently lots of other RFCs to choose from, and the various browser vendors appropriately picked their favorites. I tried the above with Firefox and Safari just now, and they each did something different, and neither gave me a file called blahblahblah.

It would be great if caniuse had something for the content-disposition filename= feature!

Copy link

@Ugoku Ugoku commented Oct 16, 2015

Tested: filename*=UTF-8''ß in a script called download.php
Windows 10, x64

Opera 32, Firefox 41, Chrome 45/46 all download as download.php
IE11 and Edge both download with the correct filename!

Copy link

@alecpl alecpl commented Jul 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

4 participants