Delegate cache control from Flutter to browser (#3289)
(cherry picked from commit 9c3954a73803a0f1921926f86b9761156430dc2f)
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# 55. Remove Flutter Service Worker
|
||||
|
||||
Date: 2024-11-26
|
||||
|
||||
## Status
|
||||
|
||||
Accepted
|
||||
|
||||
## Context
|
||||
|
||||
- Flutter Service Worker have many issues regarding updating cache resources
|
||||
- https://github.com/flutter/flutter/issues/104509
|
||||
- https://github.com/flutter/flutter/issues/63500
|
||||
- Flutter is moving away from Flutter Service Worker
|
||||
- https://github.com/flutter/flutter/issues/156910
|
||||
|
||||
## Decision
|
||||
|
||||
- We remove the Flutter Service Worker and let the browser handle the cache by:
|
||||
- Remove the Flutter Service Worker initialization
|
||||
- Remove the existing Flutter Service Worker registration
|
||||
|
||||
## Consequences
|
||||
|
||||
- Twake Mail web now will validate cache with the server every time it is loaded
|
||||
- If the status code is 200, new resources will be fetched
|
||||
- If the status code is 304, old resources will be used
|
||||
- All of the existing service workers will be removed, even if it is not Flutter Service Worker
|
||||
Reference in New Issue
Block a user