Page MenuHomePhabricator

RCFilters: Investigate using ServiceWorker for faster reload
Closed, InvalidPublic

Description

The goal here is to avoid redoing the frontend initialization.

The user has no actual reason to refresh. They have valid reasons to:

  1. Use either Live Update or "View newest changes".
  2. Change their filters.

So instead, when they refresh, logically we'd want to do the same as clicking "View newest changes".

But I'm not sure if this is possible.

I started looking into whether Service Workers can do it. We can definitely control caching of each HTTP request (and respond with whatever substitute we want instead). However, it doesn't look (though I'm not sure) like we can just block refresh and do a JS action instead.

(There is also the option of just showing a message discouraging reload, like https://stackoverflow.com/a/3527113/47773 . But this is annoying for the user if they're going to ignore the warning.)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I don't think this will work.