When you run grunt, the connect server is started first. The connect server directly starts inserting the livereload script into html and then also directly opens the index page in the browser. The watch task, which is responsible for running the actual livereload server, starts only after that. As a result, the page initially cannot connect to the livereload server. Basically, livereload is disabled until the first manual refresh.
Need to reconsider the order in which things are run during the default task.
When you run
grunt
, theconnect
server is started first. Theconnect
server directly starts inserting the livereload script into html and then also directly opens the index page in the browser. Thewatch
task, which is responsible for running the actual livereload server, starts only after that. As a result, the page initially cannot connect to the livereload server. Basically, livereload is disabled until the first manual refresh.Need to reconsider the order in which things are run during the
default
task.