Support » Plugins » Hacks » force refresh

  • Hello all,

    I have a website set up on wordpress. It runs on a computer in a gallery, available for all visitors to get more information. The main page, the home page, is the portal to everything. From there, you can get into specific sections (pages, not posts) and leave comments there.

    I need a way to force refresh from the pages to the home page, in the case that a person clicked on a specific page but registered no activity within X seconds. Let’s say he started writing a comment, but he apparently stopped and left the computer. I’d like it to refresh back to the main page, for the other visitors of the gallery. How can that be achieved?

    If there’s a way to pop up an alert, warning that person (just in case he’s still there, just wandered off…), that would be sublime.

    Thank you in advance 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • You’ll have to use javascript, use javascript’s setTimeout() to call a js function that changes the page location back to the main page after X seconds. You can have it do another setTimeout for a message that ask any possible visitor if they need more time, then if that also times out, do the redirect.

    All of this is Javascript, the only WordPress part would be to add the script to the header.

    Hi Xephan, thanks for your reply. Can you help me get started? I’m not a coder… 🙁

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘force refresh’ is closed to new replies.