Hacker News new | ask | show | jobs
by davidmurdoch 945 days ago
MV3 now brings "offscreen documents" and persistent service workers.
1 comments

> MV3 now brings "offscreen documents"

Yeah, at first I thought of using offscreen documents as a replacement, but it appears that:

1. They're not persistent too.

2. They have a different purpose, they're supposed to be used as a temporary crutch that gives access to DOM features for the time until it's brought to service workers.

> persistent service workers

You're right to write it in cursive, there're ways to prolong the lifetime of a service worker, but they're not persistent anyways. All in all, the only reliable way to live with service worker is to rewrite extensions in a way that allows them to very quickly initialize after the service worker is brought back to life. For some extensions it's easy, for some it's quite a complicated task.

edit: formatting

I have it on good authority (Chrome Devrel) that the method described here https://developer.chrome.com/docs/extensions/migrating/to-se... is no longer limited to only managed devices for enterprise or education.
Here’s what I heard: they are okay with such a workaround for now because they realize how hard it is to adapt to the new model, but in the future they’d prefer to see extensions adapt and be able to quickly reinit.