Browser-sync: Should have ability to disable reload/injections via UI

Created on 3 Sep 2015  路  3Comments  路  Source: BrowserSync/browser-sync

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.

bug

Most helpful comment

@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.

All 3 comments

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

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

w88975 picture w88975  路  3Comments

ronilaukkarinen picture ronilaukkarinen  路  4Comments

hgl picture hgl  路  3Comments

tonyoconnell picture tonyoconnell  路  3Comments

ericmorand picture ericmorand  路  3Comments