2 ms·
I wondered about this use-case in the context if data URIs. In theory, an alternative way to serve page content (instead via HTTP 200) should be to return a 3x
by xg15 7y ago
I wondered about this use-case in the context if data URIs.
In theory, an alternative way to serve page content (instead via HTTP 200) should be to return a 3xx redirect and set the location header to a data URI.
This would indeed allow you to use URL shorteners or any kind of open redirect as a de-facto web host.
("In theory", in the sense that HTTP allow redirects to point to any kind of URL, so there is nothing saying it couldn't be a data uri)
I imagine this kind of situation is something that browser developers explicitly want to avoid, because the security implications would be a nightmare. So practically browsers do not follow redirects to data uris.