Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Empty white screen on your website (JS crash): how to fix it

PRF-380High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

An empty white screen is a page that loads but shows nothing. No header, no form, no button. The server answered fine (the status is often 200 OK), but the browser has nothing to show.

The usual cause is a JavaScript crash. This is an uncaught error in a script that builds the page. It is most common on sites where JavaScript draws the content, such as React, Vue or Angular apps, and on pages that hide content until a script reveals it (for example an A/B testing or anti-flicker snippet).

Why it costs you leads or sales

Visitors who see a blank page leave within seconds. They do not see an error, so they do not report it. You only see paid clicks that never convert.

It is also easy to miss. The crash may only happen in one browser, on one device, after a consent choice, or when a third-party script is slow. You open the page on your laptop and it looks fine.

Where a JS crash breaks the funnel
  1. Ad clickVisitor lands on the page
  2. Page loadsHTML arrives with status 200
  3. Script crashesUncaught error, nothing is drawn
  4. Form or checkoutNever shown
  5. Lead or saleNever happens

The ad click works and the page loads, but the crash stops everything after it.

Conversions with and without the crashExample numbers
Conversions with and without the crash (example)Page working: 40 leads per 1,000 visits; Crash in one browser (30% of traffic): 28 leads per 1,000 visits; Crash for everyone: 0 leads per 1,000 visits0153140280Page workingCrash in one browser …Crash for everyoneleads per 1,000 visits

Example: illustrative numbers only. If the crash hits every visitor, leads fall to zero. If it hits one browser, you lose that share.

How to check if your site has it

Find the error in your browser
  1. Open the page in a private window

    This avoids extensions and cached files that can hide or cause the problem.

  2. Open the developer tools

    Press F12, or Ctrl+Shift+J (Windows/Linux) or Cmd+Option+J (Mac) in Chrome. Select the Console tab and reload.

  3. Read the first red error

    Look for messages such as Uncaught TypeError: Cannot read properties of undefined, Uncaught ReferenceError, or SyntaxError. The file name and line number show which script failed. Later errors are often side effects of the first one.

  4. Check the Network tab

    Reload and look for red rows (failed or 404 files). A missing JavaScript bundle also gives a white screen.

  5. Test other browsers and devices

    Try Safari, Firefox and a phone. Older browsers fail on newer JavaScript syntax that Chrome accepts.

  6. Test with consent accepted and declined

    Some crashes only happen when a cookie banner blocks a script that another script depends on.

Common console messages and what they usually mean
MessageUsual cause
Cannot read properties of undefinedA script expects an object that has not loaded, such as a blocked library or an empty API response
X is not definedA script ran before its dependency loaded, or the dependency failed to load
Unexpected tokenA file was cut off, returned an HTML error page instead of JS, or uses syntax the browser does not support
Failed to load resource: 404The JavaScript bundle moved or was deleted after a deploy or plugin update
Minified React errorA component threw while rendering and there is no error boundary

How to fix it

Fix the crash
  1. Identify the script that throws

    Use the file name in the console error. Decide whether it is your code, a theme or plugin, or a third-party tag.

  2. Undo the latest change

    If the page worked yesterday, roll back the last deploy, plugin update, theme change or tag publish. Then re-apply changes one at a time.

  3. Disable or fix the offending script

    Remove the broken third-party tag, or update it. If it is your code, add the missing check (for example test that an element exists before using it).

  4. Make the page fail safely

    Wrap non-essential scripts so one error cannot stop the rest. In React, add an error boundary so a single component cannot blank the whole app.

  5. Clear caches

    Purge your CDN and page cache so visitors do not get an old HTML file that points to a deleted bundle.

Where to look on each platform
  1. Find the conflicting plugin

    Switch to a default theme and deactivate plugins in groups (Plugins > Installed Plugins). Reload after each change until the page returns.

  2. Check minify and combine settings

    Caching or optimisation plugins that combine, delay or defer JavaScript are a frequent cause. Turn those options off, purge the cache and test.

  3. Turn on debug logging

    In wp-config.php set WP_DEBUG and WP_DEBUG_LOG to true to catch a PHP fatal error that also gives a white screen. Turn it off afterwards.

Log uncaught errors so you can see themjavascript
window.addEventListener('error', function (e) {
  console.error('Uncaught:', e.message, e.filename, e.lineno);
  // Send to your own logging endpoint here
});

window.addEventListener('unhandledrejection', function (e) {
  console.error('Unhandled promise rejection:', e.reason);
});
Before and after the fix

Crashing page

  • Console shows an uncaught error
  • Page is blank in some or all browsers
  • Form and buttons never appear
  • Ad spend lands on an empty screen

Fixed page

  • Console is clear of blocking errors
  • Content renders in all tested browsers
  • Form and buttons work
  • Errors are logged if they return

How to confirm it's fixed

Confirm the fix
  • Hard reload in a private window and see the full page
  • Console shows no red errors that stop rendering
  • Page works in Chrome, Safari, Firefox and on a real phone
  • Page works with cookie consent accepted and declined
  • Form submits and the thank-you page loads
  • CDN and page cache purged
  • Page still renders the next day, after caches refresh

How to prevent it happening again

Prevention habits
  • Test key landing pages after every theme, plugin, tag or deploy change
  • Use a staging site for updates before going live
  • Publish tag changes in small batches with a note on each version
  • Add error boundaries and global error logging
  • Give anti-flicker and A/B snippets a timeout
  • Pin third-party script versions where the vendor allows it
  • Run a scheduled check on your money pages, not only manual tests
How a silent crash unfolds
  1. Example: Monday 10:00

    A plugin update changes a script file name

  2. Example: Monday 10:05

    The page loads an old bundle path and returns a 404, so the screen is white

  3. Example: Monday to Wednesday

    Paid clicks keep arriving, no leads come in, nobody reports it

  4. Example: Wednesday 09:00

    Someone spots the drop in the weekly report

  5. Example: Wednesday 11:00

    The update is rolled back and the page works again

How FunnelGuard handles this

FunnelGuard detects this today. A robot visitor opens your page on a schedule, as a real browser would, and records page errors. It also runs assertions on each step, such as checking that the form, button or key text is actually on the page. On a white screen the page errors show up and the assertions fail, because there is nothing to find.

Questions people ask

Why is my website showing a blank white page?

The most common reason is a JavaScript error that stops the page from rendering. Other causes are a PHP fatal error, a missing script or CSS file, or a script that hides the page and never shows it. Open the browser console and read the first red error to find out which.

How do I find the JavaScript error causing a white screen?

Open the page in a private window, press F12, and select the Console tab. Reload the page and read the first red error, which names the file and line. Also check the Network tab for files that failed to load.

Why does my page go blank after a plugin or theme update?

An update can rename or remove a script file, change how scripts are combined or delayed, or conflict with another plugin. The page then loads a script that fails. Roll back the update, then re-apply changes one at a time to find the cause.

Why is my page blank in Safari but fine in Chrome?

Safari and older browsers may not support newer JavaScript syntax or features that Chrome accepts. One unsupported line can crash the whole script. Test in Safari with the console open, and transpile or polyfill the code if it is yours.

Can Google Tag Manager cause a white screen?

Yes. A Custom HTML tag with a script error, or a tag that hides page content, can blank the page. Use Preview mode to see which tag fires before the error, or publish the last working container version.

Will a white screen hurt my ad performance?

Yes. Visitors from paid clicks see nothing and leave, so you pay for clicks that cannot convert. Because no error is shown to the visitor, the problem can go unnoticed for days without monitoring.

How can I know when my page goes blank?

Run a scheduled check that loads the page in a real browser, records page errors and asserts that key elements are present. FunnelGuard does this and sends an alert with a screenshot and a likely cause, after re-checking from a second region.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: page errors + asserts fail.

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.