Lesson 3 of 10Diagnostics

14 min · theory and practice · Basics

Blank pages: JavaScript, MIME and release caches

Test the application boot, asset versions and browser errors as well as the HTML.

Distinguish a reachable document from a successfully running interface and test each layer.

An application page is a chain of resources. A server can return valid HTML with status 200 while the interface never appears because a module failed to load or initialize. Start by asking what the browser needed to execute.

Capture the first boot error

Open the page with Console and Network. The first loading or execution error is often more useful than later failures caused by the missing module. Record the resource URL, status, response type and short error message.

Preserve evidence before clearing everything; otherwise you can lose the distinction between stale cache and a server response problem. Establish reproducibility, then perform a controlled comparison.

Read the exact resource URL from the HTML

Verify that the script references a published asset version. Probing a similarly named app.js does not test a differently named bundle. The HTML and release directory must form a consistent pair.

Inspect the GET response body: an application fallback can return the main HTML page with status 200 for a missing file. HEAD alone or a file size cannot establish that the intended JavaScript was delivered.

Commands
curl -sS --max-time 5 http://localhost/
curl -sS -i --max-time 5 http://localhost/assets/bundle.8a1.js
Example output
HTTP/1.1 200 OK
Content-Type: text/html

<!doctype html>...

Connect MIME type with the loading mode

A JavaScript module must pass the response-type check. A file’s presence on disk does not repair HTML delivered as a module or an unsuitable MIME type. Inspect nginx location, alias/root and type mapping.

Console evidence should agree with the Network response. If the type and body are correct, investigate runtime failures and dependent application requests rather than continuing to change MIME settings.

Commands
sudo nginx -T
curl -sS -D - -o /dev/null --max-time 5 http://localhost/assets/bundle.8a1.js

Check cache and release consistency

A cache can retain HTML that references an old bundle removed from the server. Content-hashed names distinguish versions but require coordinated publication and retention of older assets. Clearing one person’s browser does not repair everyone else’s release.

no-cache requires validation before reuse, whereas no-store prohibits storage. A valid 304 does not mean an empty resource: the browser uses its stored representation. Compare a normal load with a fresh session, then inspect the actual user interface.

From symptom to check

ObservationNext checkHow to interpret it
HTML 200, empty interfaceConsole and entry-module requestTest application boot rather than document reachability.
Asset 200 containing HTMLExact URL, location and fallbackA success status does not turn the body into JavaScript.
Fresh session works, old session failsHTML/asset versions and cache headersCheck the release contract for existing clients.

Common mistakes

  • Closing the incident after curling the document.
  • Treating clearing your own cache as the full repair.
  • Disabling type checks instead of repairing the server response.

How to prove recovery

  1. The HTML references a reachable asset of the intended version.
  2. Body and Content-Type match the module; no new boot errors appear.
  3. The visible interface and a normal reload were tested.

MINI INCIDENT

Why did changing the filename not complete the repair?

The module now exists, but Console reports text/plain. What should you compare before editing again?

Evidence to investigate
script type=module src=/assets/bundle.8a1.js
GET /assets/bundle.8a1.js → 200, Content-Type: text/plain
Explore the diagnosis

Compare the actual GET response with the effective location serving that path. A wrong version and wrong response type can coexist. After fixing the type, still verify application boot and a repeat load.

WORKSHOP

Workshop: explain the evidence and choose an action

An existing client and a new client received different HTML versions.

Sample evidence
old HTML → bundle.a1.js → 404
new HTML → bundle.b2.js → 200
old HTML Cache-Control: max-age=3600
  1. Why does the new client’s success not prove recovery for everyone?

    Compare your reasoning

    Existing clients can still use cached old HTML. The release contract must account for those asset references too.

  2. What should be compared in the release policy?

    Compare your reasoning

    Compare document freshness, asset names and retention of previous versions. Changing Cache-Control alone cannot restore an already removed bundle.

  3. Which verification reflects user experience?

    Compare your reasoning

    Test a normal reload in an existing session and a fresh-session load. Both must boot without an entry-module failure.

CHECK YOUR UNDERSTANDING

Why is no-cache different from no-store?

Show explanation

The first permits storage but requires validation before reuse. The second prohibits storing the response. Choose the policy for the resource’s purpose rather than as a universal blank-page fix.

Documentation

Guest progress is stored separately in this browser.

TAKE IT TO THE TERMINAL

Practice on an incident

Choose a linked case and write three diagnostic checks before changing configuration. After the repair, repeat the original user operation.

DID IT MAKE SENSE?

Was this article helpful?

Rate the article or tell us what needed more explanation. Your feedback helps improve the lessons.

Helpful 0 Not helpful 0

Sign in to rate this article and leave a comment.

Discussion

0

Join the discussion →

No comments yet. Share your first impression or ask a question about this topic.