Support » Plugin: Force Refresh » Infinite Refresh

  • Resolved tacticjuls

    (@tacticjuls)


    Hi, i installed the plugin in my website and in homepage stays in loop… How can i fixed this?

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

    (@jordanleven)

    Hey @tacticjuls, could you send over the URL of the site you’re experiencing an issue with? Thanks!

    Thread Starter tacticjuls

    (@tacticjuls)

    First i have a question:
    Refresh interval what means? This module will refresh the page automatically? o only when i press force refresh?

    Second:
    I realize that this infinite loops occurs when i press refresh site.
    Now, i deleted and installed again the module, the homepage is stable.. But when i press refresh, the loops starts. congresoaap2020.com

    Plugin Author jordanleven

    (@jordanleven)

    @tacticjuls,

    Good question! The refresh interval refers to how often the visitors will check with your site to see if the page they’re on is outdated. So, for instance, let’s say your refresh interval is set to 30 seconds. If a visitor visits your site and, after that, you initiate a refresh, it will be a maximum of 30 seconds before their page refreshes. There’s no way to tell all browsers to immediately refresh without something like web sockets set up, which would require a specific server configuration.

    To see what I’m talking about, you can go to any page and look at the HTTP request section of your browser’s network panel (XHR) and see the outgoing requests to check the current site version. In the returned payload, you’ll see an object containing currentVersionSite, which would be the hash of your current site version (for instance, it looks like the current hash on your site is 46408af0). If another request comes in where the hash is different than 46408af0, then the site refreshes.

    For your latter question, there should never be an infinite loop where any page refreshes more than once every thirty seconds, so if that’s happening, it’s possible there’s a bug I’d have to investigate and be able to replicate the issue on my end. So for that, a good start would be the following:

    1. The version of WordPress you’re running.
    2. Screencaptures of the issue, which can be done by following these steps:

    a. Begin screen capture by showing three browser windows at the same time. These must remain visible during the entire screen capture process.

    – One open on the admin page of the news page (the admin page you’re attempting to refresh)
    – One open on the home page with the Network panel open to the XHR section.

    b. Initiate a refresh from either the admin bar or the Force Refresh section under Tools.
    c. Make sure that the screen capture shows the home page experiencing an infinite loop of refreshses.

    Thread Starter tacticjuls

    (@tacticjuls)

    Okey.
    So, if i put it at 30 seconds, every 30 seconds will check this hash, if hash is different the page will we reload automatically.

    Here is the video: https://drive.google.com/file/d/15g2XUdjn2qc5_7ZJql7SQjKda4Bv1EaU/view?usp=sharing

    WordPress Version 5.5.3
    Thanks for helping me!

    Plugin Author jordanleven

    (@jordanleven)

    @tacticjuls,

    The screen capture was perfect! Thanks for sending that over.

    I did some digging on my end to see if I could replicate the issue. I was not able to replicate it in my environment by creating a new page, activating the plugin, and initiating a force refresh. However, I’d still like to debug this with you to get a better idea of what’s happening so I can get this sorted out on your site.

    If you’re interested, I can send you a modified version of the plugin that will give me more information to help debug this. This version of the plugin does everything the regular version of the plugin does except it doesn’t actually cause browsers to refresh. Instead, it’ll output some data in the console. This means you’ll be able to initiate a refresh, but it won’t be causing users to have their browsers infinitely reload.

    How does that sound to you?

    Thread Starter tacticjuls

    (@tacticjuls)

    Sounds Great

    Plugin Author jordanleven

    (@jordanleven)

    Perfect – I’ll work on getting that over to you. In the meantime, does this issue happen only on the homepage or are you able to replicate it on other pages?

    Thread Starter tacticjuls

    (@tacticjuls)

    No, only en el homepage.

    Plugin Author jordanleven

    (@jordanleven)

    Great – that’s helpful to know. It sounds like the issue is related to the specific way the homepage is set up. I’ll go ahead and get a debugging version of the plugin set up and send it over to you later today (I’m on UTC-5 time).

    Thread Starter tacticjuls

    (@tacticjuls)

    Ok, no problem. I’m on UTC -3.

    Plugin Author jordanleven

    (@jordanleven)

    @tacticjuls,

    Awesome! I went ahead and put together a release that you can install on your site that would replace the existing Force Refresh plugin. Please add this plugin to your site and activate it. Notably, this will not cause any browsers to reload – even if a refresh is requested.

    The debugging build can be downloaded from the issue I’ve created on GitHub here.

    Questions? Let me know!

    Plugin Author jordanleven

    (@jordanleven)

    @tacticjuls,

    Minor update – I’m automating the way beta versions are built so if you haven’t already downloaded it, you can download the debugging version here on GitHub.

    The source code for this version can be reviewed here while changes made to the plugin to arrive at this version can be reviewed here.

    Plugin Author jordanleven

    (@jordanleven)

    @tacticjuls,

    Since I haven’t heard back from you, I’m going to close this thread out. If you continue to experience issues, feel free to respond here.

Viewing 13 replies - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.