Are there any problems in leaving the code of livereload of the grunt on my online server?

Are there any problems in leaving the code of livereload of the grunt on my online server?

Code on base.php:

<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35840/livereload.js?snipver=1"></' + 'script>')</script>

If there, what can I do to have the code only in developement? I don’t wanna use the browser plugin, because we have many computers on development and the code is more comfortable to use.

You definitely should not do this. It will cause an unnecessary request resulting in a 404 and document.write blocks page rendering as well (not that this matters as much since its as the bottom of the page).

One solution is to wrap that <script> tag in a PHP conditional to check if its development. Maybe by checking the host? Depends on your setup.

I see. Ok I’ll do that.
Thanks for the tip.