How can I temporarily disable browsersync, so that it doesn't inject/modify HTML pages? (For testing and debugging.)
How Does BrowserSync Work? BrowserSync starts a small web server. If you're already using a local web server or need to connect to a live website, you can start BrowserSync as a proxy server. It injects small script into every page which communicates with the server via WebSockets.
By"synchronizing file changes and interactions across multiple browsers and devices", that means almost everything you do in one browser is watched and performs on other browsers and devices that you are connected to via BrowserSync.
In Sublime Text 3 go to Preferences -> Browse Packages... Open 'Browser Sync' folder and edit the browser property in browser_sync_launch. js file. Save this answer.
There doesn't seem to be a configuration option to do just this, but one hacky workaround is to use snippetOptions
to specify a string that will will never be found in the HTML:
snippetOptions: {
rule: {
match: /qqqqqqqqq/
}
}
If this string cannot be found in the HTML, the snippet will never be injected, and browsersync will be inert.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With