Hacker News new | past | comments | ask | show | jobs | submit login

Firefox quirk

When specifying a value for the attribute, Firefox will not automatically give the file the correct file extension like Chrome does. [...]

I beg to differ. This is not a "quirk" and Chrome does not anything "correctly" that Firefox doesn't. From the HTML5 spec, regarding the "download" attribute:

"There are no restrictions on allowed values, but authors are cautioned that most file systems have limitations with regard to what punctuation is supported in file names, and user agents are _likely_ to adjust file names accordingly." [1] (emphasis mine)

As we can see, the spec clearly does not require a browser to do anything to the filename given as download's value. And it seems that the only reason a browser should consider doing any kind of change -- according to the spec -- is if the underlying OS cannot handle a filename's syntax. I don't know if Windows still does that but e.g. DOS used to have a restriction that filesnames must be at most 8 characters, and end in a dot followed by a three letter extension. Unix-derived operating system do not have the system, so if the OP is running on, say, on a Mac, there's no reason for Firefox to fiddle with the filename. It conforms to the standard.

Now, which behavior is more reasonable is a totally different question, of course...

[1] http://www.w3.org/html/wg/drafts/html/master/links.html#attr...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: