How to keep a website from logging you out in Chrome

Reload a tab you leave open before its idle limit, or click the site's stay-signed-in prompt when it appears.

Chrome has no setting that stops a website from ending your session for inactivity. If the site renews the session when the page loads, reloading before that limit usually keeps you signed in. The site still decides. A fixed maximum session length, a daily sign-in, or a multi-factor prompt will sign you out anyway.

Goal What to add
Reload on a timer Refresh Page and Repeat
Click a Stay signed in warning Wait / Delay Until, then If / Else and Click Element in Then
Alert if you were signed out If / Else on the sign-in URL, with Send Alert in Then

Use this on a dashboard, queue, or portal you leave open. Do not use it on a tab where you are typing. A reload drops text you have not submitted.

Why the site logs you out

OWASP’s session guidance separates two limits, and the site enforces both on the server:

  • An idle timeout ends the session after a period with no HTTP request for that session. OWASP describes a few minutes as common on high-value apps, and about 15–30 minutes on lower-risk ones. Your site can use a different number.
  • An absolute timeout ends the session after a maximum lifetime, even if you keep using it. You have to sign in again.

Some sites also run a countdown in the page and show a Stay signed in or Extend session button before the idle limit. Clicking that button, or loading the page again, is often enough to reset the idle timer. Neither one resets an absolute timeout.

Check the site’s own setting first

Look for Keep me signed in or Remember me on the sign-in form before you automate anything. On a work account, follow your organization’s policy. This guide keeps a session you are allowed to keep. It does not bypass a sign-out your administrator requires.

Reload before the idle timeout

You’ll need Tab Automation installed. Custom automations are free; Explorer unlocks the full Dashboard. Google Search is coming soon. The side-panel tour covers first-time setup.

  1. Open the signed-in tab you want to keep.
  2. Open Tab Automation from its toolbar action. The extension opens in Chrome’s side panel.
  3. Click New Automation. Under Select a Tab, turn off Always start this automation in a new tab, then pick that tab.
  4. Click Add Step, then choose Refresh Page. Leave Bypass cache off. A normal reload is enough to send a new request.
  5. Turn on Repeat at the End block. It is off in a new automation. Enabling it starts with a 30-second Fixed wait.
  6. Set that wait shorter than the site’s idle limit. If the site signs you out after 15 minutes of inactivity, Fixed 600 seconds (10 minutes) leaves a margin. The 15 minutes is an example, not a timeout we measured.
  7. Click Save & Run.

Each cycle reloads the tab, waits, then starts again. Pause stops the run until you Resume it. Remove Automation deletes it. Repeat can also stop after a cycle count or a duration if you do not want it to run until you pause it.

The wait is a request, not a guaranteed clock time. Chrome limits alarms in installed extensions to at most once every 30 seconds and can delay them further, including when the computer sleeps. A 600-second wait sits well above that floor. The interval table lists other waits. The dashboard guide explains why the wait should also be longer than the page’s load time.

This works on a tab you are not looking at. See auto refresh a background tab for hidden tabs versus tabs Chrome has discarded.

Click the stay-signed-in warning

Use this when the site shows a button before it logs you out, and you would rather not reload every few minutes.

Leave Pause when this wait succeeds off. A successful wait with that switch on skips the click.

  1. Follow the same setup through New Automation and the open tab. Do not add Refresh Page.
  2. Click Add Step, then Wait / Delay. Switch it from Delay to Until.
  3. Set Until trigger to Appears. You will paste the button’s selector in a moment. A new Wait step starts as a 2-second delay, so raise Timeout after you switch to Until. If the warning shows up after about 10 minutes, set Timeout to Fixed 900 seconds so the wait outlasts it. The maximum is 3600 seconds. Until checks about every 250 milliseconds. A timeout records a warning and the run continues. It does not mean the button was found.
  4. Add If / Else after the wait. It is marked Experimental. That label does not change the check. A new If is already set to When Page, Compare Exists.
  5. Click Pick on page and select the Stay signed in button while it is visible. If the warning is not on screen, wait for it once, pick the button, then continue. The card shows the selector. Copy it into the Wait step’s CSS selector field.
  6. In the Then frame, click Add Step and choose Click Element. Pick on page the same button.
  7. Turn Repeat on. A 30-second Fixed wait is enough here: it is only the gap after the click or the timeout, before the next cycle.
  8. Click Save & Run.

The If is there so a missing button does not stop the run. Click waits up to six seconds, then pauses the automation if the element is still missing. After a timed-out wait, Exists is false, Else runs, and the click is skipped. An empty Else continues.

Until does not reload the page while it waits. The next cycle opens the Start URL in that tab again, so a long timeout returns there about once per wait instead of every few minutes. If the tab has moved, that navigation loads Start again.

Get an alert if you were signed out

Put this after the reload, or in the Else of the button check. If / Else runs once, when the runner reaches it. It does not watch for a later change.

  1. Add If / Else.
  2. Set When to URL, and choose Path or Full URL.
  3. Set Compare to Contains.
  4. Set To to Text, and enter a path that appears only on the sign-in page. /login is an example. Use the path your site actually shows.
  5. In Then, click Add Step and choose Send Alert. A new alert includes a desktop notification and a sound.

For Slack, Discord, or ntfy, turn on Webhook on that alert and follow send a Slack webhook when a Chrome page changes. If a desktop Test is silent, follow Chrome notifications not working. Send Alert does not send email or SMS.

Check the URL again in If, rather than alerting immediately after a Wait timeout. A timeout only means the button never appeared. The sign-in page is the signal that the session ended.

Keep the session alive without an extension

For a temporary test, open DevTools, select Console, and paste:

const timer = setInterval(() => {
  fetch(location.href, { credentials: "same-origin" });
}, 600000);
// Stop this timer without leaving the page:
// clearInterval(timer);

The delay is 600,000 milliseconds, or 10 minutes. The request includes the page’s own cookies. OWASP defines idle time from the last HTTP request, so a site that works that way may treat this as activity. Run clearInterval(timer) to stop it.

A navigation or reload removes this timer. It also does not click a warning dialog, and it does not extend an absolute timeout. Hidden tabs add another limit: Chrome can throttle page timers. Tab Automation schedules the next cycle outside the page.

What this will not do

  • Do not type in the tab. Refresh Page reloads it and drops unsubmitted text. Every later cycle also opens the Start URL. If you had moved the tab somewhere else, the next cycle brings it back, and that load drops unsubmitted text too.
  • This is not a mouse jiggler. Click uses Chrome’s debugger on the element you picked. It does not move your operating-system pointer, and it does not keep a Teams or Slack status on Active.
  • It does not replay a heartbeat request. There is no step that repeats /ping, /heartbeat, or another background URL. The reload and the button click are the two actions above.
  • It cannot beat an absolute timeout or a multi-factor prompt. When the site demands a new sign-in, reload and click will not satisfy it.
  • Chrome has to stay open, and the computer has to stay awake. Extension alarms do not fire after you quit Chrome. Running automations are rescheduled when Chrome starts again. Sleep can delay the next cycle.
  • Some tabs cannot be automated. Chrome UI pages, extension pages, and the Chrome Web Store are excluded.
  • One automation stays on one assigned tab. A second portal needs its own automation.

Automations stay in chrome.storage.local on this computer. Read the privacy policy for permissions and data handling.

If you are still signed out

Open Activity. A Wait timeout is a warning, not a sign-out. A paused Click means the button was missing or could not be pressed. The sign-in URL check is what tells you the session ended.

Sign in again in that tab, then Resume. If the site uses an absolute timeout, a shorter wait will not help. The session ends on the site’s schedule no matter how often the tab reloads.

Claim a free 6-month Explorer License for the full Dashboard. The Explorer License is available for a limited time.

Learn about the Explorer License

We’re not quite ready yet

Thanks for your interest. We’re still getting Explorer License ready, and we’ll open it up soon.