On this page
What this issue is
A session is how a website remembers a visitor between pages: their cart, login and form progress. It is usually held by a cookie and a server record that expires after a set time of inactivity or a fixed time since it began.
A session timeout without warning happens when that time runs out while someone is mid-checkout. The next click gives an error such as "Your session has expired", a blank page, a login screen, or a cart that is suddenly empty. Nothing told the shopper it was coming.
Common causes: a short session lifetime set in the platform or server, a security setting on payment pages, a cached page holding an old security token (nonce), a cart reservation that expires, or a cookie that is dropped when the browser is backgrounded on mobile.
Why it costs you leads or sales
Checkout is the last step before revenue. Real people get interrupted: a phone call, a search for their card, a check of a delivery date. If they return after the timeout and everything is gone, many will not start again.
It also hurts trust. A sudden error on a payment page makes people wonder whether they were charged or whether the site is safe. Paid traffic is wasted too, because you paid for the click that ended at the empty cart.
- Add to cartCart saved in the session
- Start checkoutDetails partly filled in
- Shopper is interruptedSession expires with no notice
- Click PayError or empty cart
- Order confirmedPurchase never tracked
The shopper is interrupted, comes back, and the session has ended without any warning.
Example: illustrative numbers only. The longer the gap, the more likely the session has expired and the shopper gives up.
How to check if your site has it
Start a real checkout
Add a product to the cart, go to checkout and fill in the contact and shipping details. Stop before paying.
Wait and leave the tab idle
Leave it for 15, 30 and 60 minutes in separate tests. Try on a phone too, switching to another app in between.
Come back and continue
Click the next button. Note whether you get an error, an empty cart, a login screen or lost form fields.
Look for warnings
Did any message appear before it expired? A countdown or a prompt to extend counts as a warning.
Check the cookie lifetime
In Chrome DevTools open Application, then Cookies. Look at the Expires/Max-Age value of the session and cart cookies.
Check your support inbox
Search for messages like "my cart disappeared" or "session expired", and look for checkout steps with high exits in your analytics.
How to fix it
The fix has four parts: make the session last longer, warn before it ends, save progress so nothing is lost, and recover gracefully if it does end. Where you can change settings depends on your platform.
Exclude checkout from page cache
In your caching plugin, exclude the cart, checkout and account pages. Cached pages can carry an expired security token (nonce) that causes errors.
Lengthen the WooCommerce session
WooCommerce sessions last 48 hours by default. If yours is shorter, a plugin or a wc_session_expiration filter is probably overriding it. Add the snippet below to a child theme or code snippets plugin to set it.
Check security plugins
Some security or membership plugins set an idle logout. Raise or disable it for customers.
Know what you control
Shopify manages checkout sessions and cart cookies itself, so you cannot set the lifetime directly.
Remove theme or app interference
Disable apps that rewrite the cart or add custom timers, and test again. Check for scripts that clear the cart.
Enable abandoned checkout emails
In Settings, then Checkout, set automatic abandoned checkout emails so shoppers get a link back to their saved cart.
Raise the server session lifetime
Set the session cookie lifetime and server garbage collection time to at least several hours for checkout, for example session.gc_maxlifetime in PHP or the session maxAge in your framework.
Refresh on activity
Use a sliding expiry so each request extends the session, rather than a fixed time from the start.
Store the cart server-side
Tie the cart to an ID that outlives the session, such as a long-lived cookie or the customer account.
Know what you control
Webflow Ecommerce handles cart and checkout sessions for you, so the lifetime is not adjustable.
Remove custom code that clears carts
Check Project Settings, then Custom Code, for scripts that reset storage or redirect during checkout.
Turn on abandoned cart recovery
Enable the abandoned cart emails in Ecommerce settings, where available on your plan.
Know what you control
Wix manages the checkout session, so the lifetime is not adjustable.
Enable cart recovery
Set up automatic abandoned cart emails from the Wix dashboard so shoppers can resume.
add_filter( 'wc_session_expiration', function () {
return 3 * DAY_IN_SECONDS;
} );Show a warning before expiry
If your system has a hard limit (for example a stock hold), show a visible countdown or a message such as "Your cart is held for 10 more minutes" with a button to extend it.
Save form data as people type
Keep contact and address fields in the server, or in sessionStorage, so a reload or new session restores them.
Use a clear expired message
If the session ends, say so in plain words, keep the cart and send the shopper back to the step they were on. Avoid a blank page or a generic error.
Add guest cart recovery
Capture the email early in checkout and send a link that restores the cart.
Before
- No warning as time runs out
- Click Pay gives a generic error
- Cart is empty and details are gone
After
- Longer session and a clear hold notice
- Expired message explains what happened
- Cart and fields restored, one click to continue
How to confirm it's fixed
- Fill in checkout, wait past the old timeout, then continue: no error appears
- If a hold time exists, a warning shows before it ends
- The cart and typed details are still there after a reload
- An expired session shows a clear message and returns the shopper to checkout
- The test also passes on a phone after switching apps
- The cart and checkout pages are excluded from caching
How to prevent it happening again
- Re-run the idle test after plugin, theme, caching or hosting changes
- Record the session lifetime in your launch checklist
- Review checkout exits and support emails each month for session errors
- Keep abandoned cart emails active
- Test on mobile as well as desktop
How FunnelGuard handles this
FunnelGuard does not check for session timeouts during checkout yet. It is a possible future check. A robot visitor runs a journey quickly and does not wait through a long idle gap, so a slow expiry would not show up in a normal run.
What FunnelGuard does catch nearby: it runs your real checkout journey on a schedule from the EU or the US, checks each step and the tracking hits sent to GA4, Google Ads, Meta and other platforms, and re-checks a failure from a second region before sending one alert with a screenshot and a likely cause. If a broken cart or checkout step stops the journey, that kind of failure can be seen. It stops before payment unless the store's test mode is set up.
To watch for timeouts today, repeat the manual idle test above after every release, search support mail for session errors, and watch checkout drop-off in your analytics. The free plan (1 site, 2 journeys, daily checks, no card) covers the basics of your checkout journey, and a free read-only website audit is also available.
Questions people ask
Why does my checkout say the session has expired?
The server ended the visitor's session after a set period of inactivity or a fixed lifetime, or a cached page held an out-of-date security token. Check your platform's session setting, exclude checkout pages from caching and look for plugins that log users out.
How long should a checkout session last?
Long enough for a normal interruption, typically several hours of inactivity for the cart and checkout. Keep the cart saved for days, and only shorten the time on pages showing personal or payment data.
Why is my cart empty when I come back to checkout?
The cart was tied to a session or cookie that expired or was cleared. Store the cart server-side or against an account, extend the cookie lifetime and use cart recovery emails.
How do I warn customers before their checkout session ends?
Show a message or countdown when a hold is about to end, with a button to extend it. Also save their form data so nothing is lost if it does expire.
How do I fix the WooCommerce session expiring too fast?
Exclude the cart and checkout pages from caching, then set the session length with the wc_session_expiration filter. Also check security and membership plugins for idle logout settings.
Can I change the checkout session time on Shopify?
No, Shopify manages checkout sessions itself. You can remove apps or scripts that clear the cart and turn on abandoned checkout emails so shoppers can resume.
Does FunnelGuard detect checkout session timeouts?
No. It is not a check FunnelGuard offers yet and may be added in future. It does run your checkout journey on a schedule and alerts you if a step breaks, but you should test idle timeouts by hand.
Related issues
- PRF-230Back button loses form/cart stateFix guide
- PRF-216Form loses entered data on validation errorFix guide
- PRF-229Back button broken (history hijacked, redirect loop)Fix guide
- PRF-219Submit button disabled with no explanationFix guide
- PRF-214Error messages unclear or genericFix guide
- PRF-208Main CTA not visible without scrollingFix guide