LiveReload JavaScript code that communicates with the server and implements reloading