Re:Those HTML attributes you never use
by chrisfinazzo on Monday April 04, 2022 @09:41AM
(#30906522)
Huh. Whenever I've used it, things have all been on the same domain so this doesn't come up - good to know.
[ Parent
| on HN ]
Re:Those HTML attributes you never use
by strogonoff on Monday April 04, 2022 @10:30AM
(#30907038)
If your user clicks the link with download attribute and your server (or reverse proxy, or CDN, etc.) issues an error page, user agent downloads the HTML of that page and saves it under the filename you provided. Domain does not enter the picture.
(Correction: per spec, the domain does enter the picture in that cross-domain <a download> is not supposed to work at all without Content-Disposition response header; that’s slightly different matter to what’s discussed.)
Re:Those HTML attributes you never use
by chrisfinazzo on Monday April 04, 2022 @11:06AM
(#30907508)
In my uses, I can be almost certain that I won't get a 404 back as a response, unless I forgot to do something - although the others are a concern. Even though Netlify allows setting headers and redirects, I obviously don't control the image they use or the CDN generally.
Something to watch out for.