Get the latest tech news

Document.write


This is really cool: ...blah... <script>writeImage("dog.jpg", "my dog")</script> ...

Outputting a bunch of <img>'s lets the loading happen in parallel, any slowdown is negligible. There was Paco Coursey's article Grug XSLT a few weeks ago and the promise of it really appealed to me a lot: a browser-based templating system that works on static hosting, no generators, no dynamic code, but still you can make any pieces reusable and DRY. This will show just "content", because the script will think its parent is <head>, and <body> doesn't exist yet.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Document.write

Document.write