Deployed web page to firebase host doesn't reflect all changes made, depending on device that loads the page. Flutter web

212

I have had this issue before, the thing is that the web page is being cached, I use Cloudflare on my own project and it to purge my cache so that changes can visible on all platforms. You might also manually need to clear caches on all your browsers. Then if none of this works you could stop flutter from using service workers and hence remove the PWA functionality from your project.

Share:
212
Vincenzo
Author by

Vincenzo

At age of 40 an accident forced me in bed for a few months and I realised that I wanted point my life in a different direction to really fulfil my purpose in life, help others and help making this planet a better place. I love to create stuff and I constantly have perhaps too many ideas. I'm now launching a bicycle related start-up. I got back into coding after 25 years away from it as it was a fundamental skill to get updated to get the project started and since then I'm working on the start-up's products. I first learned Swift as it seemed the easiest language I could learn at fast pace, but when Apple created SwiftUI framework ( Flutter copycat A.F.A.I.K ) I decided to move away from Swift the obvious choice has been learning Flutter ( the original ). So happy I made the transition and I'm not looking back.

Updated on December 17, 2022

Comments

  • Vincenzo
    Vincenzo over 1 year

    I have a a little issue and I don't understand why.. In my project I have translations in json files that get used to build UI in the Language that the device is set to. so far so good. The problem I noticed today, is that I went to correct a typo in one word so I then deployed the new version to Firebase. I change the version number in index.html file and just to have a visual reference on the mobile version I have the version number available to read.

    PROCEDURE:

    1. Flutter clean
    2. Flutter build web
    3. flutter deploy --only etc etc..

    So the weird part is that visible version number does actually updates.. but the typo is still there depending on the platform !!?? I checked on: Android phone on chrome -> typo is 2 deploys old iPhone Safari -> typo is 1 deploy old Mac Chrome using JS console with mobile view -> typo is 1 deploy old

    changes I made in the translation file are not deployed...

    Do you know what could be causing this???

    UPDATE: On other iPhones everything is correct. This leaves me with more doubts..

    When the browser asks for the web page shouldn't firebase return the same page for everyone? why all this differences??

  • Vincenzo
    Vincenzo over 3 years
    indeed.. the pages are cached by browser.