Back to Blog

How to Keep a Web Session Alive Without Manually Clicking

PB

Patrick Bushe

July 29, 2025 · 5 min read

Most sites log you out after a stretch of inactivity, and it always seems to happen right before you hit Save. There are a few honest ways to keep a session alive in Chrome. Which one works depends on why the site is logging you out.

Why sessions time out

There are two kinds of timeout, and they behave differently:

  • Server-side idle timeout. The site's server forgets your session if it hasn't heard from your browser for a while. Any request to the site, like a page reload, resets the clock.
  • In-page inactivity timer. A script on the page watches for mouse and keyboard activity and signs you out, or shows a countdown, when there is none. Reloading the page restarts that timer too.

Some sites also have an absolute limit: you're signed out after a set number of hours no matter what. Banks, government portals and many work tools do this on purpose, and nothing on your side should get around it.

Start with the site's own options

  • Tick Keep me signed in or Remember me when you log in. It usually stretches the session from minutes to days.
  • Look in the site's account or security settings for a session length option. Many dashboards and webmail apps have one.
  • For a work system, ask whoever runs it. Short timeouts are often a policy, and IT can tell you what's allowed.

Stop Chrome from putting the tab to sleep

Sometimes the site isn't the problem. Chrome's Memory Saver frees up memory by discarding tabs you haven't looked at in a while, and when you return the page reloads, sometimes onto a login screen. Open Settings → Performance and add the site under Always keep these sites active. Also check that your computer isn't going to sleep, because a sleeping laptop drops every connection.

Reload the page on a timer

For server-side and in-page timers, a regular reload is what keeps the session going. Chrome has no built-in auto-reload, so you need an extension. With AutoBrowser, put the page you want to keep alive in a bookmark folder of its own, select that folder, and set the time per site (anything from 1 second to 5 minutes). AutoBrowser reopens the page in its tab each time the timer runs out, which counts as activity for most sites. With more bookmarks in the folder it cycles through all of them instead.

Two cautions. A reload throws away anything you've typed but not saved, so use this on dashboards, inboxes and status pages, not on a half-written form. And set the timer a little shorter than the site's timeout, not every few seconds, so you aren't hammering the server.

For scripts and test runners

If you're keeping sessions alive across automated workers (Playwright, Puppeteer or Selenium), don't log in over and over. Sign in once, save the browser's storage state (cookies and local storage), and load it into each worker. Refresh the saved state before it expires, and check the site's terms first.

When not to do it

Don't keep sessions open on shared or public computers, and don't stretch a session the site deliberately keeps short, like online banking. Those timeouts protect you if you walk away.

More Tools by Patrick Bushe

Free Chrome extensions to boost your productivity and privacy