You are suggesting to load the script using document.write, however this is a blocking operation, as described here:
When the server (the Livereload app) is not running, the browser simply waits for the connection to time out before continuing to render the page. This is especially frustrating on mobile, where it seems to take like forever to load a page.
The solution would be to use the async attribute, or to insert the script element dynamically in the DOM, as mentioned in the posts above.
I'm using this snippet:
var l = document.createElement("script");
l.async = true;
l.src = 'http://' + (location.host || 'localhost').split(':') + ':35729/livereload.js?snipver=1';
var s = document.getElementsByTagName('script');