-
Notifications
You must be signed in to change notification settings - Fork 26.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Proposal][Flutter web] : Add a flag to flutter build web
to update version to prevent cache
#71333
Comments
I can see this being an option, maybe something like flutter build web --bump-version=true but enforcing this by default might not be desirable for everyone |
@iqfareez |
flutter build web
to update version to prevent cache
If you do not want to use the server worker caching you can provide |
When I run
|
@tazik561 He just proposed a concept. Not an actual implementation. |
I build a flutter web app and deployed it via nginx hosting on my local. Now I deployed a newer version of my pwa but I still get the old website shown form the first deploy. I added version number in
Thanks a lot for any help! This is all index.html inside build/web folder:
|
If your |
I added
inside ``index.html` . This is not enough to prevent that user's browser caching ? |
You can check, which backend serves this file by taking a look a chrome's network inspector. I also witnessed that the Service worker sometimes serves this file, without making a call to the web server. I improved the situation by using |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Use case
To force browser to reload / fetch the updated web app version instead of using the cached file.
Proposal
We can update the version in
main
file. Something similar to this question.Make
flutter build web
command automatically increase the version number.My flutter version
The text was updated successfully, but these errors were encountered: