The version of the Flutter web app on the hosting is not updated.

1,943 views
Skip to first unread message

Артём Колиниченко

unread,
Dec 1, 2021, 10:34:02 AM12/1/21
to Firebase Google Group
Maybe someone has encountered, tell me ...
I don't understand: the problem is either with the cache or with Firebase Hosting quotas. I upload the Flutter Web application to hosting. For debugging, I wrote a version of the difference in a prominent place. I run the version locally on the computer - my identification mark is visible, after flutter build web -> firebase deploy. Bottom line, if you run the software locally on your computer, the changes are visible, and if you run it from firebase hosting, the old version is visible. The Blaze tariff, I wrote to support, was sent here.
fitebase.json
{
"hosting": {
"public": "build/web",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"headers": [
{
"source": "**",
"headers": [
{
"key": "Cache-Control",
"value": "no-cache"
}
]
}

]
}
}

Rodrigo de França Miss Nairnei

unread,
Dec 1, 2021, 4:19:20 PM12/1/21
to Firebase Google Group
Hi, you can add a version number on your index.html, inside web folder

Like this:

<script src="main.dart.js?version=1" type="application/javascript" ></script>

When you update a version, increment the version number, and the host undestand to force clear cache, this is util for the firebase or other hosting service.
Reply all
Reply to author
Forward
0 new messages