Auto Refresh Plus

How to Keep a Website Session Alive with Auto Refresh

Last updated

Many websites log you out after a period of inactivity. Reloading the page counts as activity on most of them, so an auto refresh timer set shorter than the site's timeout keeps you signed in. If a site logs you out after 15 minutes, reloading every 10 minutes is usually enough.

Being logged out in the middle of work is frustrating, especially on admin panels, web mail, dashboards or long forms you keep open all day. This guide explains why it happens, how a timed reload helps, and where it will not work.

Why do sites log you out?

When you sign in, the site gives your browser a session. To protect your account if you walk away from an unlocked computer, most sites end that session after a stretch with no activity. This is the “idle timeout”. Banks often use 5 to 15 minutes; business tools and web mail are often longer.

Sites measure inactivity in one of two ways, and it matters which one your site uses:

  • Server-side timeout. The server notes the time of your last request. Every page load resets the clock, so a reload keeps the session alive.
  • In-page inactivity timer. A script on the page watches for mouse and keyboard activity and signs you out when it sees none. Reloading the page restarts that script, which also resets its clock.

Some sites also have an absolute timeout: you are signed out after, say, 8 or 12 hours no matter what you do. No amount of refreshing changes that.

How does auto refresh keep a session alive?

A timed reload sends a fresh request to the site at regular intervals, exactly as if you pressed F5. To the site, that looks like you are still there, so the idle clock starts again each time. With Auto Refresh Plus it takes a few seconds to set up:

  1. 1Sign in and open a page on the site that you don’t mind being reloaded, such as the home screen or inbox.
  2. 2Click the Auto Refresh Plus icon in Chrome’s toolbar.
  3. 3Enter an interval shorter than the site’s timeout, for example 600 seconds for a 15-minute timeout.
  4. 4Press START and leave the tab open. Work in other tabs as usual.

Keep the refreshing tab awake. Chrome's Memory Saver can put a background tab to sleep, which stops its timer; add the site under Settings, Performance, “Always keep these sites active”. The Chrome auto refresh guide walks through this.

What interval prevents logout?

Pick an interval comfortably shorter than the idle timeout, leaving a margin for the timer drifting or a slow page load. A good rule is about two thirds of the timeout:

Site logs you out afterRefresh everyEnter (seconds)
5 minutes3 minutes180
10 minutes6 minutes360
15 minutes10 minutes600
30 minutes20 minutes1200
60 minutes40 minutes2400

Don't know the timeout? Note the time you leave the site idle and when it signs you out, then set the timer to about two thirds of that. Refreshing every few seconds adds nothing here and only creates extra load. For other situations, see how often a page should auto refresh.

When should you not do this?

Idle timeouts exist for a reason. Keeping a session open on purpose is reasonable on your own computer in a private place, but think twice in these cases:

  • Shared or public computers. Anyone who sits down after you gets your signed-in session.
  • Banking and payment sites. Short timeouts are a security feature, and some banks treat automated activity as suspicious.
  • Work systems with a policy. Your employer may require automatic sign-out. Check before you work around it.
  • Sites whose terms forbid automated access. Keep intervals long and respect the site's rules.

Can't install an extension on that computer? A console snippet can do the same job; see how to refresh a page without an extension.