Hacker News new | ask | show | jobs
by myhf 2968 days ago
That used to be possible [1], but it looks like redirection to a data url is blocked on current versions of Chrome and Firefox.

[1] http://indirection.modusponens.org/data:text/html,Hello,%20w...!

1 comments

In chrome, what's blocked is page-initiated top-level navigations to data URLs (because of spoofing concerns). You can load them in iframes, and you can still do a browser-initiated navigation to them (i.e., type them into the omnibox). They can be used freely as subresources.

Http Redirection to data: urls has been blocked in chrome for at least half a decade. There's really no reason to allow that, a server can just as easily return the data as the response body.