Title: force refresh
Last modified: August 19, 2016

---

# force refresh

 *  [lepenser](https://wordpress.org/support/users/lepenser/)
 * (@lepenser)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/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)

 *  [Xephan](https://wordpress.org/support/users/xephan/)
 * (@xephan)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/force-refresh/#post-1672422)
 * 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.
 *  Thread Starter [lepenser](https://wordpress.org/support/users/lepenser/)
 * (@lepenser)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/force-refresh/#post-1672625)
 * 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.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 2 participants
 * Last reply from: [lepenser](https://wordpress.org/support/users/lepenser/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/force-refresh/#post-1672625)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
