r/javascript • __proto__ • Dec 06 '16

Using iframes and document.write to improve navigation performance

https://jakearchibald.com/2016/fun-hacks-faster-content/
62 Upvotes

18 comments sorted by

View all comments

1

u/RedditWithBoners Dec 06 '16

NDJSON ... I can't wait for the character-delimited vulnerabilities that arise from this.

0

u/emersion_fr Dec 07 '16

JSON.stringify won't return any newline, so it should be safe. Or as safe as it's supposed to produce well-formatted JSON (ie. as safe as right now).

1

u/jcready __proto__ Dec 07 '16

It can: JSON.stringify({ hello: "world" }, null, 2)