browser-sync


BrowserSync Not Reloading Changes


I started BrowserSync with this command:
browser-sync start --proxy localhost:8001 --files "app/css/*.css"
I have the code snippet in index.html and when I open the page in my browser, I see the message:
Connected to BrowserSync
But when I make changes to the CSS, the BrowserSync does not reload the page with the changes. I have to manually reload to see the change.
It is --files="app/css/*.css" and not --files "app/css/*.css"
Browsersync reads index.html by default, hence you get the message 'Connected to browsersync'
And here's the solution to your answer..
In every forum I have checked, everyone is following the same nomenclature of "css/*.css". Without realizing what the initial css stands for. Its the name of the folder or directory not something for vague..
Hence, make sure that inside those quotes you have pointed to the right directory. For example, if the styles.css file is just outside (i.e. in the root directory) alongside index.html, then just write --files="styles.css". It shall work like charm.
And if you want Browsersync to watch multiple css files then put --files="*.css". If you want to sync different types of files, then use --files="*.html,*.js".
If these css files are in some directory say 'xfolder' then --files="xfolder/*.css"

Related Links

Gulp and Browsersync injecting CSS but causing a full reload
Browser-sync - serve “node_modules” out of “src” directory
[browser-sync]browser-sync proxy can't connect to Rails Application
Browserstack not serving index.html by default
whatever i do i can't access the external URL for the site or UI
How do I kill browserSync before creating it?
Unable to install browser-sync on windows 7
browser-sync proxy fails to connect
What's the equivalent bs-config.js (Browsersync) of this command?
How to quit the browser-sync server, or how to know the running server pid
browsersync not working (note: not using gulp)
Using browsersync with gulp/nodemon
BrowserSync Not Reloading Changes
Setup browser-sync to serve routes from absolute directories on windows
Browser-sync writes in console «Reloading Browsers …», but update is not happening. Why?
SSL chain of trust with browser-sync?

Categories

HOME
android
django
google-cloud-platform
porting
ng-idle
fpga
interface
pascal
3d-reconstruction
spring-session
google-admin-sdk
google-cloud-datalab
odoo-8
pkcs#11
p2p
arangodb
32bit-64bit
pcl-crypto
intercom
package-managers
feathersjs
asp.net-mvc-viewmodel
identity-management
nodemcu
gulp-watch
angular-routing
flask-sqlalchemy
short-url
perlbrew
winexe
failover
git-squash
laravel-eloquent
installshield-le
activexobject
vue-chartjs
jwplayer6
graphhopper
mongoose-schema
urlsession
xv6
hammer.js
launchctl
zenhub
sundials
css-transforms
trigger.io
baidu
angular2-testing
pacemaker
google-cloud-console
aurora
maybe
roadkill-wiki
android-launcher
alloy-ui
snackbar
trdion2011
angular-carousel
ora-00904
mintty
jjaql
wxformbuilder
spring-remoting
menubar
merb
font-awesome-4.0.0
booksleeve
dopostback
boost-msm
web-farm
adobe-media-server
azman
ikimagebrowserview
w3c-geolocation
tmx
ruby-1.8
drupal-fivestar
aspmenu
opml
unmanagedresources
commercial-application
pnrp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App