Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Form data lost on browser back button: how to find and fix it

CNV-056Low impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

A visitor fills in some or all of your form, leaves the page (for example to read your privacy policy, or by clicking a link), then presses the browser's Back button. The form is back, but the fields are empty. Browsers normally restore typed values on Back. Something on your page stops that.

Common causes: autocomplete="off" on the form or fields, a Cache-Control: no-store header that blocks the browser's back/forward cache (bfcache, a snapshot of the page kept in memory), JavaScript that builds the form after load and wipes restored values, and multi-step forms that keep their state only in page memory.

Why it costs you leads or sales

Retyping is a chore, and long forms make it worse. Some visitors will retype once; many will not. The impact is usually low on short forms and higher on quotes, applications and checkouts where people leave to check a detail and come back. It is also hard to see: no error appears, and the visitor just disappears.

How a lead is lost on Back
  1. Fills in formName, email, project details
  2. Clicks a linkOpens privacy policy or pricing
  3. Presses BackForm reloads with empty fields
  4. Retypes or leavesMany leave
  5. Lead submittedNever happens

The visitor does nothing wrong. The page simply forgets what they typed.

Visitors who return to the form after BackExample numbers
Visitors who return to the form after Back (example)Fields restored: 60 %; Fields empty: 35 %023466035Fields restoredFields empty%

Example: illustrative numbers only. Of visitors who leave and come back, fewer finish when the form is empty.

How to check if your site has it

Test it by hand in two minutes
  1. Fill in the form

    Type into every field, including dropdowns, checkboxes and radio buttons. Do not submit.

  2. Navigate away

    Click a link on the page, such as the privacy policy link beside the form.

  3. Press Back

    Use the browser Back button, not a link on the page. Note which fields are empty.

  4. Repeat in other browsers

    Try Chrome, Safari and Firefox, and a phone. Restoring behaviour differs between them.

  5. Inspect the page headers

    In Chrome DevTools open Network, reload, click the page request and look for Cache-Control: no-store. Also check Application > Back/forward cache and click Test back/forward cache for blockers.

  6. Search the code

    Look for autocomplete="off" on the form or inputs.

How to fix it

Start with the simple causes, then add a saved draft if the form is long or multi-step. Never store passwords or card details in a draft.

Fix it in order
  1. Remove autocomplete=off

    Delete it from the form and from normal fields such as name, email and phone. Use specific values like autocomplete="email" instead.

  2. Stop sending no-store on form pages

    Use Cache-Control: no-cache or a normal caching policy on marketing pages. Keep no-store only for pages that truly show private data.

  3. Do not rebuild the form on load

    If a script injects or re-renders the fields, it can overwrite restored values. Render the form in the HTML where possible.

  4. Save drafts for long forms

    Store non-sensitive field values in sessionStorage as the visitor types, and refill them on load. See the snippet below.

  5. Keep multi-step progress

    Put the step in the URL or hash so Back moves one step, not out of the form, and keep earlier answers in storage.

Save and restore a draft with sessionStoragejavascript
const form = document.querySelector('#lead-form');
const KEY = 'lead-form-draft';

// Restore
try {
  const saved = JSON.parse(sessionStorage.getItem(KEY) || '{}');
  Object.entries(saved).forEach(([name, value]) => {
    const el = form.elements[name];
    if (el && !el.value) el.value = value;
  });
} catch (e) {}

// Save on every change
form.addEventListener('input', () => {
  const data = {};
  new FormData(form).forEach((v, k) => {
    if (typeof v === 'string' && !/password|card/i.test(k)) data[k] = v;
  });
  sessionStorage.setItem(KEY, JSON.stringify(data));
});

// Clear after a successful submit
form.addEventListener('submit', () => sessionStorage.removeItem(KEY));
Where to change it by platform
  1. Check your form plugin

    In plugins such as Gravity Forms, WPForms or Contact Form 7, look for an autocomplete or save-and-continue setting and enable save and resume if offered.

  2. Check caching headers

    Review your caching or security plugin for a rule that sends no-store on all pages, and exclude form pages.

How to confirm it's fixed

Confirm checks
  • Fill in every field, click a link, press Back: values are still there.
  • Test in Chrome, Safari, Firefox and on a phone.
  • Chrome DevTools > Application > Back/forward cache shows no blocker related to your page.
  • The draft is cleared after a successful submit, so the next visitor on a shared computer sees an empty form.
  • Multi-step forms: Back moves one step and keeps earlier answers.

How to prevent it happening again

Add the Back test to your release checklist for any change to forms, themes, caching or security plugins. These are the changes that most often bring no-store or autocomplete="off" back. When a form is rebuilt in a new tool, test it before launch.

How FunnelGuard handles this

FunnelGuard does not check this yet. A back-navigation step is a possible future check, but today it is not part of the product.

What FunnelGuard does cover nearby: a robot visitor runs your real lead form journey on a schedule from the EU or the US, checks each step, the tracking hits sent to platforms like GA4, Google Ads and Meta, and whether test leads reach your inbox and CRM. If a form change breaks submission, you get one alert with a screenshot and a likely cause after a second-region re-check. That will not tell you if Back empties your fields.

To watch for this issue yourself, repeat the manual Back test after every form, theme or caching change. You can also watch session recordings in a tool you already use and look for visitors who retype the same fields. FunnelGuard has a Free plan (1 site, 2 journeys, daily checks, no card) and paid plans with a 3-day free trial.

Questions people ask

Why does my form clear when I press the back button?

The page was reloaded from scratch, a script rebuilt the fields, or the form uses autocomplete="off". A Cache-Control: no-store header can also stop the browser restoring the page from its back/forward cache.

How do I stop a form from losing data when users go back?

Remove autocomplete="off", avoid no-store on the page, and do not re-render the form with JavaScript on load. For long forms, save non-sensitive values in sessionStorage as the visitor types and refill them on load.

What is bfcache and how does it affect forms?

The back/forward cache keeps a full snapshot of a page in memory so Back feels instant, including typed form values. Headers like Cache-Control: no-store and some scripts can block it. Chrome DevTools shows blockers under Application > Back/forward cache.

Does autocomplete=off stop browsers restoring form values?

Often yes. It tells the browser not to remember or restore field values, which can make Back return an empty form. Use it only on fields that should never be stored.

Is it safe to save form data in sessionStorage?

It is fine for non-sensitive fields like name or project description, because sessionStorage clears when the tab closes. Never store passwords, card details or other sensitive data, and clear the draft after a successful submit.

How do I keep progress in a multi-step form when someone clicks back?

Put the current step in the URL or hash so Back moves one step, and keep earlier answers in sessionStorage or on the server. Refill the fields when each step loads.

Can FunnelGuard detect form data lost on back navigation?

No. FunnelGuard does not check this yet; it is a possible future check. It does run your lead form journey on a schedule and checks submission, tracking and lead delivery.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.