Jeremy Keith avatar Jeremy Keith wrote

Netlify redirects and downloads

Screenshot of “Netlify redirects and downloads”

I knew about the download attribute, but not that it requires for the files to be on the same origin.

Technically, what Jeremy does on Netlify is a rewrite instead of a redirect, thanks to the 200 HTTP status code. The browser still sees the same URL, on the good origin, but Netlify proxies the request to Amazon S3. A true redirect — with a 301 or 302 status code — wouldn't work, I guess.

Also, I really like how Jeremy promotes the Mstack:

I guess this is JAMstack. Though, given that the J stands for JavaScript, the A stands for APIs, and I’m not using either, technically it’s Mstack.

I also promoted the Mstack a few month ago, as the best foundation for progressive enhancement, in promoting the Mstack! 👍