• Resolved qwik3r

    (@qwik3r)


    I checked my logs and and noticed that wp-admin/admin-ajax.php?action=force_refresh_get_version&nonce=xxxx&postId=xxx (I just put xxx because that info is relevant) and was wondering if it’s part of this plugin. I would assume so since a quick google search came across another thread here with a similar url.

    What’s interesting is why the plugin is functioning so often when I thought it wasn’t supposed to do it on any regular interval, for example:

    So can you confirm a) that this is your plugin and b) why so many requests to the url are being made where it says “Force refresh”?

    Not every page on my site has that in the url, just a handful.

    https://share.getcloudapp.com/6qurxZmv

    THanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author jordanleven

    (@jordanleven)

    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 3 years, 5 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.

    Plugin Author jordanleven

    (@jordanleven)

    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?

    Plugin Author jordanleven

    (@jordanleven)

    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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Question about constant requests’ is closed to new replies.