Giter VIP home page Giter VIP logo

Comments (19)

blaise-io avatar blaise-io commented on August 18, 2024

from live-reload.

blaise-io avatar blaise-io commented on August 18, 2024

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.

1

It should show something like this:

2

from live-reload.

adventmedia avatar adventmedia commented on August 18, 2024

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.

modx-developer avatar modx-developer commented on August 18, 2024

the same problem, 1.8, windows 7, chorme last

dont reload

from live-reload.

blaise-io avatar blaise-io commented on August 18, 2024

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

adventmedia avatar adventmedia commented on August 18, 2024

_generated_background_page html 2020-02-22 11-48-12

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.

modx-developer avatar modx-developer commented on August 18, 2024

Screenshot_2
Screenshot_1

from live-reload.

blaise-io avatar blaise-io commented on August 18, 2024

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

adventmedia avatar adventmedia commented on August 18, 2024

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.

blaise-io avatar blaise-io commented on August 18, 2024

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

adventmedia avatar adventmedia commented on August 18, 2024

I don't know what screen shot you're referring to, but this is the current configuration:
Update: ALM 2020-03-26 11-57-31
As for the polling, please tell me how to enable or view it.

from live-reload.

blaise-io avatar blaise-io commented on August 18, 2024

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

adventmedia avatar adventmedia commented on August 18, 2024

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.

blaise-io avatar blaise-io commented on August 18, 2024

from live-reload.

blaise-io avatar blaise-io commented on August 18, 2024

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

blaise-io avatar blaise-io commented on August 18, 2024

Fixed in 1.8.1, currently awaiting review in Chrome, published for Firefox.

live-reload-1.8.1-chrome.zip

from live-reload.

adventmedia avatar adventmedia commented on August 18, 2024

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.

blaise-io avatar blaise-io commented on August 18, 2024

Angular's routing uses the History API.

By the way, Angular also has ng serve which should give you auto-reload.

from live-reload.

adventmedia avatar adventmedia commented on August 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.