Comments (19)
from live-reload.
Actually I checked just now and it should work, latest stable Chrome and Live Reload, so I need some more information:
Are you using Live Reload 1.8.0?
Can you show your values of the reload form?
If possible, can you share the website URL or HTML source?
You may also get some idea what's going wrong by clicking the "background page" link for Live Reload on the chrome://extensions/
page.
It should show something like this:
from live-reload.
Thanks for the quick response!
Yes, 1.8.0.
The url is local to my dev environment, http://alm-ng
The console shows logs when I change the rules config, and when I manually reload the page, but nothing when the source updates (angular cli build)
from live-reload.
the same problem, 1.8, windows 7, chorme last
dont reload
from live-reload.
@adventmedia @Fr3ddy7 I cannot reproduce the issue. Can you provide the details as requested in #15 (comment)?
Preferably with html source, screenshot or values of the reload rule and the Live Reload log as shown in my last screenshot.
from live-reload.
The screen grab shows what I described in my previous message - the console shows logs when I change a setting in the rules config (Reload stylesheets), but nothing when the site builds or rebuilds.
Monitored host is http://alm-ng/home
from live-reload.
from live-reload.
@adventmedia you're monitoring *.js but you wanted to monitor stylesheets? (typically *.css)
@adventmedia and @Fr3ddy7 please post all relevant data:
- The full devtools log (this one you did post)
- The reload rule form
- The URL of the file that changed but didn't trigger a reload
from live-reload.
no, in Angular projects the source css (scss) are compiled into a JavaScript file (styles.js)
reload rules:
- Host URL:
http://alm-ng/*
- Source file URLs:
http://alm-ng/*.js
Changed file:http://alm-ng/main.js
The odd thing is that one in a blue moon the page does reload, maybe 1 in a 100 times.
from live-reload.
@adventmedia can you post a complete devtools log as text that includes polling? if it contains data you don't want to share on the internet you can also send it to [email protected] and I will treat it confidentially.
In your screenshot I cannot see it polling yet, but in your screenshot you also didn't have the *
at the end of the host URL (so it would only monitor /
not /foo/bar
).
from live-reload.
I don't know what screen shot you're referring to, but this is the current configuration:
As for the polling, please tell me how to enable or view it.
from live-reload.
@adventmedia browse to chrome://extensions/
, click "background page" for Live Reload, click "Console" (second tab), make sure there's no filter (log level: all levels). Now open a new tab in Chrome with the page where you expect source file URLs to refresh the page. Then after a few seconds copy paste the log from the background page. It should display something like
13 "http://127.0.0.1:3000/" "matches rule" "Reload rule for Live Reload test"
background.js:193 13 "http://127.0.0.1:3000/" "initialize monitoring"
background.js:253 13 "remove webrequests listener"
background.js:183 13 "http://127.0.0.1:3000/" "matches rule" "Reload rule for Live Reload test"
background.js:193 13 "http://127.0.0.1:3000/" "initialize monitoring"
background.js:211 http://127.0.0.1:3000/static/abc/def/style.css SKIP
background.js:587 http://127.0.0.1:3000/static/abc/def/script.js matches /^http://127\.0\.0\.1:3000/.*?\.js$/
background.js:206 http://127.0.0.1:3000/static/abc/def/script.js MATCHED
background.js:211 http://127.0.0.1:3000/pages/frame.html SKIP
background.js:211 http://127.0.0.1:3000/static/abc/def/import.css SKIP
background.js:308 http://127.0.0.1:3000/static/abc/def/script.js not changed
background.js:291 http://127.0.0.1:3000/static/abc/def/script.js change detected
background.js:301 http://127.0.0.1:3000/static/abc/def/script.js reload parent page
from live-reload.
well, ok, that's what I've been doing, except for "All levels". With "All levels" enabled, here is the result.
background.js:211 https://www.googletagmanager.com/gtag/js?id=UA-7518938-11 SKIP
background.js:587 http://alm-ng/runtime.js matches /^http://alm-ng/.*?\.js$/
background.js:206 http://alm-ng/runtime.js MATCHED
background.js:587 http://alm-ng/styles.js matches /^http://alm-ng/.*?\.js$/
background.js:206 http://alm-ng/styles.js MATCHED
background.js:587 http://alm-ng/main.js matches /^http://alm-ng/.*?\.js$/
background.js:206 http://alm-ng/main.js MATCHED
background.js:587 http://alm-ng/vendor.js matches /^http://alm-ng/.*?\.js$/
background.js:206 http://alm-ng/vendor.js MATCHED
background.js:587 http://alm-ng/polyfills.js matches /^http://alm-ng/.*?\.js$/
background.js:206 http://alm-ng/polyfills.js MATCHED
background.js:587 http://alm-ng/scripts.js matches /^http://alm-ng/.*?\.js$/
background.js:206 http://alm-ng/scripts.js MATCHED
background.js:308 http://alm-ng/runtime.js not changed
background.js:308 http://alm-ng/main.js not changed
background.js:308 http://alm-ng/polyfills.js not changed
background.js:308 http://alm-ng/scripts.js not changed
background.js:308 http://alm-ng/styles.js not changed
background.js:308 http://alm-ng/vendor.js not changed
background.js:211 http://platform.twitter.com/widgets/follow_button.html?screen_name=ALMacraeAuthor&show_count=false SKIP
background.js:211 http://platform.twitter.com/widgets/follow_button.html?screen_name=ALMacraeAuthor&show_count=false&show_screen_name=false SKIP
background.js:253 147 "remove webrequests listener"
background.js:239 147 "http://alm-ng/runtime.js" "stop file monitoring timer"
background.js:239 147 "http://alm-ng/styles.js" "stop file monitoring timer"
background.js:239 147 "http://alm-ng/main.js" "stop file monitoring timer"
background.js:239 147 "http://alm-ng/vendor.js" "stop file monitoring timer"
background.js:239 147 "http://alm-ng/polyfills.js" "stop file monitoring timer"
background.js:239 147 "http://alm-ng/scripts.js" "stop file monitoring timer"
background.js:183 147 "http://alm-ng/home" "matches rule" "ALM"
background.js:193 147 "http://alm-ng/home" "initialize monitoring"
background.js:183 147 "http://alm-ng/home" "matches rule" "ALM"
background.js:253 147 "remove webrequests listener"
background.js:193 147 "http://alm-ng/home" "initialize monitoring"
background.js:211 https://www.google-analytics.com/analytics.js SKIP```
And that's it. No updates as the code changes.
from live-reload.
from live-reload.
@adventmedia I think I found the problem. https://github.com/blaise-io/live-reload/blob/master/app/background.ts#L32 the tab may trigger tabs.onUpdated when a website uses the History API or when an iframe is loaded. Can you confirm you're doing one or both of these?
from live-reload.
Fixed in 1.8.1, currently awaiting review in Chrome, published for Firefox.
from live-reload.
I don't believe I'm using the History api, though that may be buried somewhere inside the Angular framework. Only using iframe on one of the two sites I've been working on.
No matter. The updated version of LiveReload is working just fine, thank you!
from live-reload.
Angular's routing uses the History API.
By the way, Angular also has ng serve
which should give you auto-reload.
from live-reload.
indeed.
I'm using ng build --watch, because my back end is PHP, so I'm using MAMP to run a local domain from /dist. There are other ways of doing this but it's the one I know.
from live-reload.
Related Issues (20)
- [question] How to reload on backend change (not css/js)? HOT 7
- not working : chrome + localhost HOT 1
- file:// URLs no longer work in chrome HOT 1
- Firefox Permission Requirements, Remove "Access your data for all websites" HOT 2
- Live Reload not available in Chrome Web Store HOT 2
- Add extension to Microsoft Edge Add-ons store HOT 3
- Does not highlight changes HOT 1
- I cannot get it to work. I am having wordpress on local host and I am changing my custom theme files, css and js. HOT 7
- Add custom third-side css HOT 1
- [Bug] No effect when clicking on 'Create a new reload rule...' HOT 4
- Monitor the local file system instead of urls (await browser support) HOT 3
- Not working for local pages (DDEV hosted, within WSL2) HOT 4
- link[rel=stylesheet] in inject.ts doesn't pick up preloaded stylesheets HOT 3
- ignore port number HOT 1
- Avoid scrolling to the top of the page while reloading (on Firefox) HOT 1
- Avoid scrolling to the top of the page while reloading (on Firefox) HOT 1
- Is there a way to get this to monitor local source files instead of ones at a URL? HOT 2
- ERROR: Repository not found while installing the dependencies of @deadb17/[email protected]
- Кэш браузера
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from live-reload.