4 ms·
Try a hard refresh of the page. Twitter has been buggy for months. People usually mention that you have to unregister some Twitter service worker in your browse
by TonyTrapp 6y ago
Try a hard refresh of the page. Twitter has been buggy for months. People usually mention that you have to unregister some Twitter service worker in your browser, but how can that be an official fix to such a persistent problem?
- kuu 6y agoThank you, that solved the problem (the refresh)
- nitrogen 6y agoDo service workers have any stories of actually doing something good? All the ones I have encountered just seem to cause problems by breaking the browser's HTTP caching model.
- ghusbands 6y agoIt's so easy to break things with them that they're probably best avoided, but they have been used to mostly solve several problems. Like, for example, implementing preloading that can know which assets the client already has, along with a number of other caching-related tricks, and facilitating offline browsing of the site. From what I've observed through use (without any form of reverse engineering), it looks like Twitter uses them to reduce the bandwidth for individual page views after the first.
- kevincox 6y agoIMHO the most useful features have is the ability to "pin" items to the browser cache for offline usage. Of course this could have just been added to a response header or something but there are a number of flexibility provided with service workers which is arguably useful. One nice feature is purging no-longer needed cache entries for an old version of the site (Example old JS and CSS). Of course there is no reason this couldn't be done in the page context itself. The other feature that service workers are for is receiving push notifications. Although they don't need to be in the way of HTTP requests for that. So they really just allow adopting features faster then HTTP caching is updating by browsers. However they are a huge footgun if you ship a broken service worker. (You need to wait >24h for all of your users to update to a fixed version). Unfortunately if you want to be eligible for "Add to homescreen" you need one, which is a shame because this is just for offline support, which would be easy to add with a cache header. Firefox Requirements: https://web.dev/install-criteria/#criteria https://web.dev/install-criteria/#criteria Chrome Requirements: https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Add_to_home_screen#how_do_you_make_an_app_a2hs-ready https://developer.mozilla.org/en-US/docs/Web/Progressive_web...