Hook (Intro)
We assumed a blank page meant a frontend bug.
We assumed clearing cache would fix it.
We assumed CDN + IIS was a solved problem.
All three assumptions were wrong.
What looked like a random, non-reproducible UI issue turned into a multi-layer production failure that only surfaced under very specific timing conditions — and only for some users.
The Context
We were running a production-grade React SPA behind AWS CloudFront, served from a Windows IIS origin.
Stack:
The application was business-critical.
Stability mattered more than pixel perfection.
What Most Guides Recommend
Typical advice says:
We followed most of it.
Everything looked correct on paper.
What Actually Happened in Production
Users intermittently reported:
Failed to load module script… server responded with MIME type text/htmlImportant signals:
This wasn’t a typical frontend bug.
The Real Root Cause
The issue wasn’t React.
It wasn’t CloudFront alone.
It was the interaction between them.
The Broken Assumption
We assumed:
If IIS restarts and comes back up, everything is fine.
In reality:
The system behaved correctly.
It just wasn’t resilient.
What We Changed
We stopped trying to “fix cache” and instead made the system resilient.
IIS Changes
.js and .css from being rewritten to index.htmlCloudFront Changes
0Frontend Changes
No hacks.
No aggressive invalidations.
No forced browser cache clearing.
The Result
After implementation:
Performance remained stable.
CDN still cached valid content.
Failures became visible — not silent.
When This Approach Works Well
This pattern fits when:
Especially useful in enterprise multi-layer environments.
When You Should NOT Do This
Avoid this pattern if:
This is resilience engineering — not a universal template.
Key Takeaways
FAQ
Why didn’t cache invalidation solve it?
Because the issue wasn’t stale content — it was incorrect content cached as valid.
Why not just increase CloudFront TTL?
TTL does not fix incorrect responses. It can amplify them.
Could monitoring have detected this earlier?
Partially. The issue was timing-based and user-specific, making detection inconsistent.
---
Closing Thoughts
Random blank pages are rarely random.
They live in the interaction between systems — not inside a single one.
If you’ve chased something similar in production, I’d be interested in how you approached it.