Hey @qwik3r,
Yup! That’s a request that’s originating from this plugin (in fact, you can see where that call originates here since the plugin is open source).
Regarding your second question, a request is made according to the interval you set in your plugin settings. So, for instance, if you set the settings of Force Refresh to 30 seconds under “Refresh Interval”, then you’d see a request made every thirty seconds.
Hope this helps!
-
This reply was modified 4 years, 11 months ago by
jordanleven.
Thread Starter
qwik3r
(@qwik3r)
Ah ok thanks. I thought that it was just a manual refresh type thing! I didn’t realize it was forcing refresh every X amount of seconds by default.
No problem – it’s a good question! Behind the scenes, here’s how it works. When you click “Refresh” on the site or page, the version for the site or page is updated with a hashed version of the current time stamp and stores that in the database on the server. Then, users who are on your site check with the server for the current site/page version and compares the version that to the version they have stored locally on their browser. If the version differs, then the browser refreshes. This means that if you request a refresh, the connected browsers can take between zero and the refresh interval number of seconds before they are aware they are on an outdated version of the site or page.
What you’re describing (where a single action on the server-side of things can communicate immediately to connected browsers) would be possible with the implementation of WebSockets but unfortunately, that would require that users of the plugin make additional configuration changes on their server (assuming, of course, that their host even allows it).
Thread Starter
qwik3r
(@qwik3r)
I basically thought I set things up so that it would refresh only 1 page as that is all I needed to refresh but it sounds like what you’re saying is that it takes a timestamp snapshot and anyone that doesn’t match that the (entire) site refreshes?
If you only refresh a page without refreshing the site, it will only refresh users who are on the page. However, the network requests will continue to happen for all pages to check to see if the site version has updated (although a refresh will only happen if a site refresh is requested).
Thread Starter
qwik3r
(@qwik3r)
Gotcha, thanks for clarifying.