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

How to replace .html with forward slash in BrowserSync?
Error during instillation of browser sync
When using browser-sync,why is the browser saying cannot get, while everything seems fine
How to sync the actions performed on webpage using Browsersync?
lite-server, BrowserSync: setting other URL path than /
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)

Categories

HOME
shell
asp.net-web-api
adal
design-patterns
time-complexity
depth
pclxl
gradient
r-googlesheets
google-apps
zip
azure-container-service
nfs
accessibility
qpython
okhttp
fosrestbundle
syntaxnet
drop-down-menu
endeca
x-cart
php-5.6
http-post
atlassian-stash
imessage
delphi-xe5
sencha-touch
babel
visual-studio-extensions
joptionpane
hta
zxing
stackexchange
motion-detection
spotipy
ceylon
nsurl
panoramas
quickfixj
instantiation
protege4
sim-toolkit
alphabetical
sessionstorage
flatmap
connection-pool
azure-arm
stringtokenizer
android-softkeyboard
logback-groovy
strftime
configurationmanager
datamaps
payara-micro
magic-draw
video-conferencing
css-transforms
payload
lsyncd
rxtx
pocketsphinx-android
mapxtreme
autosar
segment-io
google-cloud-console
clipboard.js
swizzling
android-wake-lock
qiime
libav
httpruntime.cache
asyncdisplaykit
libvlc
concurrentmodification
computer-architecture
slash
batik
dulwich
alloy-ui
fail2ban
shopizer
qtwebengine
adehabitathr
mass-assignment
infosphere-spl
uncaught-typeerror
deform
rickshaw
universal-image-loader
personalization
paste
bin
ice-cube
flex++
process-explorer
patricia-trie
xcode3.2
wcf-configuration
instantiationexception
aspmenu
feasibility
complex-event-processing
alsb
int64
unmanagedresources
lemmatization

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