4 ms·
Here's one that works without JavaScript, you curmudgeon: data:text/html;charset=utf-8,%7B%20%22foo%22%3A%20%22bar%22%2C%20%22baz%22%3A%20%5B%20%22qux%22%2
by CGamesPlay 6y ago
Here's one that works without JavaScript, you curmudgeon:
data:text/html;charset=utf-8,%7B%20%22foo%22%3A%20%22bar%22%2C%20%22baz%22%3A%20%5B%20%22qux%22%20%5D%2C%20%22%23render%22%3A%20%22%3Chtml%3E%3Cbody%3E%3Cdiv%20id%3Dcontent%3E%3Ch1%3EMy%20fancy%20document%3C%2Fh1%3E%3Cp%3EThis%20is%20a%20completely%20%26quot%3Bnormal%26quot%3B%20HTML%20document.%3C%2Fp%3E%3C%2Fdiv%3E%3Cstyle%3Ebody%20%7B%20visibility%3A%20hidden%3B%20%7D%20%23content%20%7B%20visibility%3A%20initial%3B%20position%3A%20absolute%3B%20top%3A%200%3B%20%7D%3C%2Fstyle%3E%3C%2Fbody%3E%3C%2Fhtml%3E%22%20%7D
You can paste this directly into your URL bar, and view source to see the valid JSON document.
- Arnavion 6y agoIt's a valid JSON document that's basically unrelated to the HTML that ends up being displayed, so it's not exactly equivalent to the submitted link. What the submitted link achieves is impossible without JS, which is also why it's a cute hack and should only be used in production with the knowledge that it's not going to work well for clients without JS.
- ben174 6y agoClever, but this is the same hack.
- quickthrower2 6y agoCheck out my search engine: data:text/html;charset=utf-8,<meta http-equiv="refresh" content="0;url=http://google.com/ http://google.com/" />
- croon 6y agoAnd now you can no longer read it with a json reader, which I assume was the motivation for the hack to begin with.