MikeRogers0 / LivePage

LivePage for Google Chrome reloads website resources (such as CSS, HTML and JavaScript) as they change on the server.
https://livepage.mikerogers.io/
GNU Affero General Public License v3.0
176 stars 53 forks source link

Page keep refreshing (HTML served with RubyOnRails) #116

Closed nakwa closed 6 years ago

nakwa commented 6 years ago

Just bought the chrome extension: I am developing a React/Redux application, bundled with Browserify and served with Rails. I'd like the page to refresh only when Browserify (watchify) is rebuilding my client bundle (javascript file).

At the moment the page just constantly keeps refreshing and I can't find out why. Any option or any log I can look at? What exactly is the trigger to refreshing the page? File size, hash?

Any help is appreciated. Thanks!

MikeRogers0 commented 6 years ago

Hi @nakwa LivePage works by polling JS/CSS files it finds on page load via AJAX.

It's highly likely that it's found a file that it has determined is changing every time it polls it (I've not done to much in depth work with React unfortunately to say for sure).

In its options page ( chrome://extensions/?options=nagjcklpinhochdlhekonkhakkbmmjed ) you can try disabling JS monitoring and see what effect that has :)

nakwa commented 6 years ago

Ok, this was actually caused by Rails generating a new authenticity_token both in head/meta and as CDATA every time it serves an HTML page - so ignoring HTML hidden fields and comments in HTML did the trick. Thanks for the prompt answer!

MikeRogers0 commented 6 years ago

Oh awesome! Thank you for updating the ticket with a solution :)