Browsersync not Injecting or Refreshing page

If all else fails check for a commented <body> tag  before your <body> tag within the source code. Right-click the page and select View Page Source to eliminate this cause.


<!-- <body><script id="__bs_script__">//<![CDATA[
    document.write("<script async src='/browser-sync/browser-sync-client.js?v=2.26.3'><\/script>".replace("HOST", location.hostname));
//]]></script> -->

Browsersync appends its Java script after the first <body> tag it finds regardless of whether it is embedded in a comment or not! Obviously, being wrapped in a comment  effectively disables it from injecting or refreshing the page.

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out comment
Enter name