flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
165.16k stars 27.24k forks source link

Verify that non-CORE resources are loaded correctly through the service worker #75861

Open yjbanov opened 3 years ago

yjbanov commented 3 years ago

https://github.com/flutter/flutter/pull/75535 fixed application and service worker versioning issue. However, reportedly there's still an issue with us loading stale resources when the app is updated. Our tests may not be covering this, so we should revisit this specifically and make sure this is covered by tests.

jonahwilliams commented 3 years ago

I wonder if we should just remove non-core caching for now?

yjbanov commented 3 years ago

Wouldn't that effectively kill offline support?

jonahwilliams commented 3 years ago

Err, I guess we could switch that to online-first instead

jonahwilliams commented 3 years ago

good point

azbuky commented 3 years ago

What worked for me was to create a new request from event.request, and setting the init object to { 'cache': 'no-cache' }, when fetching from the server in the service worker's fetch event handler.

https://github.com/flutter/flutter/blob/6db3d61ed4a58ba89140d7fe1fd294b598cc29c5/packages/flutter_tools/lib/src/build_system/targets/web.dart#L592

flutter-triage-bot[bot] commented 10 months ago

This issue is marked P1 but has had no recent status updates.

The P1 label indicates high-priority issues that are at the top of the work list. This is the highest priority level a bug can have if it isn't affecting a top-tier customer or breaking the build. Bugs marked P1 are generally actively being worked on unless the assignee is dealing with a P0 bug (or another P1 bug). Issues at this level should be resolved in a matter of months and should have monthly updates on GitHub.

Please consider where this bug really falls in our current priorities, and label it or assign it accordingly. This allows people to have a clearer picture of what work is actually planned. Thanks!