Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to temporarily disable browsersync?

How can I temporarily disable browsersync, so that it doesn't inject/modify HTML pages? (For testing and debugging.)

like image 255
mjs Avatar asked Dec 20 '14 09:12

mjs


People also ask

How does BrowserSync proxy work?

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.

What is BrowserSync connected?

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.

How do I change browser browser sync?

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.


1 Answers

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.

like image 193
mjs Avatar answered Oct 08 '22 11:10

mjs