After the deployment process completed successfully, the site still displays the old version in most browsers. Only one browser shows the correct version.
I’ve already tried clearing the entire browser history and performing a hard reload, but the issue persists.
Currently, I’m deploying via the CLI because the Publish button hasn’t been working for the past week.
Could you please help me resolve this issue? Thank you!
Hello! Oh, that’s a classic and very frustrating issue. It’s almost certainly a caching problem, but it’s happening at a level deeper than your normal browser cache.
The fact that it works in one browser but not others is the master clue. It tells us the deployment was successful, but your “main” browsers are holding on to the old version very aggressively.
This is almost always caused by one of two things:
A Service Worker: This is the most likely culprit. If your app is a PWA (Progressive Web App), it has a “super-cache” (the service worker) that is designed to serve the old version while it fetches the new one in the background. A simple hard reload often isn’t enough to bust it.
CDN Propagation Delay: Firebase Hosting is a global CDN (Content Delivery Network). Sometimes it takes 5-10 minutes for your new files to be available everywhere.
Here’s how to fix it, starting with the most likely solution.
The #1 Test: Use an Incognito Window
Before you do anything else, open a new Incognito or Private window and try to load your site.
If it works: The problem is 100% a cache on your local browser. The fix is Solution 1 below.
If it still shows the old version: The problem is the CDN. The fix is Solution 2 below.
Solution 1 (If Incognito Worked): Nuke the Service Worker
This means your browser has a “super-cache” (the Service Worker) that is stuck. You need to manually delete it from your browser’s developer tools.
Here’s how in Chrome (or any Chromium browser):
Go to your website.
Open Developer Tools (Press F12 or Ctrl+Shift+I).
Go to the “Application” tab.
On the left-hand menu, click on “Storage”.
Check the box that says “including third-party cookies”.
Click the big “Clear site data” button. This is the “nuke” button that clears everything: cache, cookies, and (most importantly) unregisters all service workers.
Now, do one more Hard Reload (Ctrl+Shift+R or Cmd+Shift+R).
Your site should now load the new version.
Solution 2 (If Incognito Failed): Wait for the CDN
If even a fresh Incognito window shows the old version, this means the Firebase Hosting CDN just hasn’t fully updated yet.
Wait 5-10 minutes. This is especially true if you are re-deploying very quickly. The CDN needs time to invalidate its cache of your index.html file around the world.
Check the Hosting Dashboard: Go to your Firebase Console > Hosting. You should see your latest deployment at the top of the list with the correct time. This confirms that Firebase received the new files.
I hope this helps! My bet is on the Service Worker (Solution 1), as it perfectly explains why a hard reload wouldn’t work.
Thank you for your time and response. I found that the issue is related to my custom domain. When I add the DNS records for my Google Cloud Functions (to receive the webhook), it affects the DNS records for my app hosting. If I remove the Google Cloud Function DNS records, the URL works fine. However, after deploying, I add the Google Cloud DNS records again, the browser again shows the old version of the site. It’s strange, and I’m not sure how to handle this issue.
Before adding the main domain, I had four A records and four AAAA records. Now, I’ve added a subdomain (abi.mydomain. com) and received a CNAME record. I’ve added it and am currently testing. If it works, I’ll update here. Thanks.
I just removed my custom domain from App Hosting and added it only to Cloud Functions — now everything works perfectly. In Cloud Functions, I manually selected the latest build from the container image and deployed it.