blaise-io / live-reload

Browser extension for web devs. Monitors source files on a page and reloads page or source file when a change is detected.
MIT License
60 stars 9 forks source link

[question] How to reload on backend change (not css/js)? #16

Closed tomsquest closed 4 years ago

tomsquest commented 4 years ago

Hi @blaise-io ,

It is documented that, yes, live-reload can reload the page on backend change. And I did success to do that some weeks/months ago But as of today, I am not able to reload on backend change (not css, nor js).

How to reproduce

  1. Setup extension on localhost:4200/*, also tried with an additional localhost:4200/search/products (see screenshot)
  2. Change backend page (rendered html)
  3. No reload occurs.

Config:

image

Infos

blaise-io commented 4 years ago

You cannot reload on a backend change, but the backend change usually results in an updated source file URL and you could monitor that file.

tomsquest commented 4 years ago

Hi Blaise,

Yes, that was I am aiming at : reloading when the source change.

For info, I have a Go backend that produce html, which is reloaded on change (inotifywait magic).

In the screenshot above, I tried with http://localhost:4200/search/products/ (which was the url of my browser). But this was not working. Same with a trailing *, with or without the trailing /. Is there something special to do ?

Thanks a lot.

blaise-io commented 4 years ago

So you want to update the page when the page itself is updated?

Does Host URL: http://localhost:4200/*, Source file URL: http://localhost:4200/* work for you?

tomsquest commented 4 years ago

No, the page is not updated on html change with this config. Css is.

Is there a way to report the monitored resources in Firefox ?

Thanks Blaise.

blaise-io commented 4 years ago

I probably broke monitoring the page itself in 1.8.0, I’ll fix that this week.

On 31 Mar 2020, at 07:14, Thomas Queste notifications@github.com wrote:

 No, the page is not updated on html change with this config. Css is.

There is the badge with value 2 corresponding to the 2 css files loaded with the page. Here are the network call after a page reload, 3 resources (one html, 2 css) :

Updated version to 1.8.1 and accepted the permission change (and restarted Firefox) Is there a way to report the monitored resources in Firefox ?

Thanks Blaise.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

blaise-io commented 4 years ago

@tomsquest I fixed this in Live Reload 1.8.2. If a source URL matches the host URL the page will monitor itself. Can you confirm it works?

tomsquest commented 4 years ago

Hi @blaise-io ,

It works with 1.8.2 !

Thanks a lot for the work (I read a bit of the code and there is much more that I thought !).

Regards, Tom