4 ms·
Huh. Whenever I've used it, things have all been on the same domain so this doesn't come up - good to know.
by chrisfinazzo 5y ago
Huh. Whenever I've used it, things have all been on the same domain so this doesn't come up - good to know.
- strogonoff 5y agoIf 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.)
- chrisfinazzo 5y agoIn 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.