BrowserSync / browser-sync

Keep multiple browsers & devices in sync when building websites. https://browsersync.io
https://discord.gg/2d2xUThp
Apache License 2.0
12.18k stars 757 forks source link

Should have ability to disable reload/injections via UI #802

Closed codeofsumit closed 8 years ago

codeofsumit commented 9 years ago

We searched for a way to stop automatic refresh (auto-reload / live-reload) of the page when changing a file.

Turns out, it is possible when clicked on "disable all" on the following screen:

image

Even when re-enabling all options on this page, the page won't be automatically reloaded. When "enable all" is clicked again, live-reload works again.

We searched for exactly this option but the current UI doesn't show if live-reload is active or not or that it even can be changed there.

shakyShane commented 9 years ago

also codeSync: false in the Browsersync config will disable all reloads

shakyShane commented 8 years ago

fixed via https://github.com/BrowserSync/UI/commit/eb9d5b3ddb47a02ba92f40fdcb1ffcb450808027

sgarbesi commented 8 years ago

@shakyShane Is there a way to simply disable browser sync on a given page? Maybe just a small snippet in console? I have to run through a number of steps on Page A, meanwhile I'm working away at Page B trying to fix an issue, but I don't want Page A to reload, just Page B.


Answer:

___browserSync___.socket.disconnect();

Although it would be nice if there was an official way to pull this off where you can maybe specify a URL parameter to activate BrowserSync on the page.