Have you ever opened a site in Safari, only to find it mysteriously breaks in normal mode, but works perfectly in private browsing? That happened to me recently with a JavaScript-heavy web app â and hereâs how I tracked it down and fixed it.
đ§© The Symptoms
- Site wouldnât load in regular Safari.
- Same site worked just fine in private mode.
- Safariâs Web Inspector Console showed cryptic errors like:
- TypeError: undefined is not an object (evaluating ‘Hr[Qr][Ie]’)
- Unhandled Promise Rejection: Error: No response received
- 404 Not Found on /manifest.json
đ Investigation with Safari Web Inspector
In the Console, the JavaScript error pointed to a chunk of code inside a minified file like main.4e230b2a.js. That meant something in the app was failing very early â before rendering anything.
Switching over to the Sources tab, I found this line in the HTML:
<script>
const log = localStorage.getItem("log")
</script>
That line itself wasnât failing, but it hinted the app was using localStorage heavily â and likely relying on specific stored values to boot correctly.
đĄ The Key Insight
Because the site worked in private mode, that meant the problem was almost certainly tied to something stored in localStorage or cookies. Private mode doesnât persist localStorage or cookies between sessions, so it gave us a clean slate.
â The Fix: Clear LocalStorage
To confirm the theory, I opened the site in normal Safari, opened Web Inspector > Console, and ran:
localStorage.clear();
Then refreshed the page â and boom, the site loaded perfectly again.
đ Bonus: Safer Alternatives
If you donât want to clear everything, you can target just the problem key:
localStorage.removeItem("log");
Or inspect whatâs in storage:
console.log(localStorage);
đ Takeaway
If a web app works in private mode but not normal mode, always suspect:
- Corrupt or stale data in localStorage
- Cookies that donât match current server state
- Extensions blocking or injecting scripts
- Cache mismatch between frontend and backend
Safariâs developer tools can help you trace it â even though theyâre a bit hidden compared to Chromeâs.

Leave a Reply
You must be logged in to post a comment.