Well, then see drdaeman's response. There's no reason to add anything more which requires JavaScript unless there's absolutely no alternative.
Otherwise, why not just serve up a blank page which executes JavaScript to add characters one at a time?
These hints can be placed inside the HTTP response header. A JavaScript API can only be used via `<script>`, which can only appear on the page (after the HTTP response has arrived).
Off-hand, I'd guess you can use these hints earlier in the loading process than you could start executing JS.