expo / web-examples

Examples of using Expo in the browser.
272 stars 51 forks source link

ServiceWorkers always serving stale html #60

Closed NiciusB closed 5 years ago

NiciusB commented 5 years ago

Hi! I'm not familiar with either ServiceWorkers or Workbox, so I might be missing some configuration, but since it's not documented opening an issue makes sense anyway.

A serviceworker is caching html pages and never updating them, causing the app to stay forever at the same version it was initially loaded on that particular URL path. When I upload new versions of my app to a domain, if I hard-refresh (Ctrl+Shift+R on chrome) the new version will show, but after refreshing normally the old one shows up again.

I have checked and the last-modified header is changing, so I see no reason for this to happen. Should I be sending an ETag?

NiciusB commented 5 years ago

Fixed by https://github.com/expo/expo-cli/pull/1082

DrKylstein commented 4 years ago

I updated to 3.11.5 and still seem to have this problem. Is there a new option somewhere?