-
Notifications
You must be signed in to change notification settings - Fork 362
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
Updates to status entries don't show up unless I refresh the page #389
Comments
For perf, there are a few extra layers of caching now that didn't exist before. When updating/adding/removing a feature, the list may not reflect it right away. features.json is now being cached by the browser (http caching) and service worker. The latter will choose network first, but the former will keep the file around for 10min. https://github.com/GoogleChrome/chromium-dashboard/blob/master/settings.py#L34 |
I hit this two. I ended up creating 3 entries for "Notification image" since the new ones weren't showing up: Navigating to the dashboard homepage was not enough, and I think even explicitly refreshing the page didn't help - I had to use Shift+F5 to refresh bypassing service worker. Compounding this issue, there also seems to be no way to delete an entry. |
I've removed the dupes. When you create a feature, would a message like "Feature created. It may take a few moments to show up on the dashboard" be sufficient"? I want to strict the right balance of having the added caching for users vs. annoying/confusing contributors. The majority of users will benefit for the caching. |
Could adding (or editing) a feature invalidate the local cache, so at least the author sees it straight away? It would also be nice if refreshing the page without pressing Shift was sufficient to see updated information. FetchEvent.isReload gives you that information, but is apparently going away and being replaced with @jakearchibald, what's the best practice for making (non-Shift) reloads work? |
The endpoint features.json is requested, network first by the service worker. So it should always be the latest stuff. I think the issue here is that we added browser/http caching to that endpoint as well for browsers that don't support sw). So the when you refresh the page, you'll still get the browser's cached copy for 10min. /features.json is becoming a fairly hefty response as more features are added to the dashboard. Keeping http caching on the endpoint would be my preference. After creating a feature, what if we redirected to the individual page (e.g. https://www.chromestatus.com/feature/5687338902487040) rather than the /features list? That would give you immediate results and would help prevent dupes. |
Redirecting to the individual page wouldn't work, because that feature isn't found in features.json, so it would just displays the homepage list anyway (that's what happens today if you explicitly visit the link). I think the key is to invalidate the cache when it is changed locally, or when the user reloaded the page. It seems this can be done by setting request.cache to 'no-cache' when you fetch features.json, if it has been invalidated. |
Not sure I completely follow. https://www.chromestatus.com/feature/5687338902487040 is served with But yea, the feature wouldn't show up on the list (chromestatus.com/features) until features.json was invalidated. Using We support it right? I see FF is just now adding it: https://hacks.mozilla.org/2016/03/referrer-and-cache-control-apis-for-fetch/ |
Oh, maybe https://www.chromestatus.com/feature/5687338902487040 would work. I was thinking of the very similar URL https://www.chromestatus.com/features/5687338902487040 (with an s after |
I think there must be something else going on here - in #397 we saw this happening in Chrome where the SW should be working fine. Adding a new feature should be rare enough that invalidating or even force re-fetching any possibly stale resources shouldn't really be a problem. |
#397 seems like a dupe of this. |
To add to the confusion, this isn't happening for me. I just added two new features and they showed up right away on https://www.chromestatus.com/features. In that profile I see However, in another profile, I see ....and in an incognito window, I see the Since features.json is requested by the sw using |
I think #399 will help address this issue |
Deployed. Let's see if it helps. |
I noticed this a while ago. I just discovered this has caused someone to create duplicate entries. [https://www.chromestatus.com/features#unload h](https://www.chromestatus.com/features#unload h)
The text was updated successfully, but these errors were encountered: