zaproxy / zap-hud

The ZAP Heads Up Display (HUD)
Apache License 2.0
253 stars 151 forks source link

Multiple Serviceworkers in Isolated Tabs #199

Open dscrobonia opened 6 years ago

dscrobonia commented 6 years ago

Testing with Firefox 62 it appears that instead of a single service worker process shared among all tabs (per domain) there is now a service worker proccess per tab (per domain). Loading new pages within a single tab still keep the same service worker, but openning a new tab spawns a new service worker.

I believe this change still complies with the service worker spec, which defines service workers as stateless, but has broken our model of how we use service workers because of a few hacks we have made to keep the serviceworker performant. This will require some changes to how I had originally mapped out multi tab support, but should still be doable.

I do still need to test on chrome. If the firefox and chrome implementations of service workers has diverged (which I would guess they have) we'll have to consider that as well.

psiinon commented 6 years ago

For ref the related Firefox bug is: https://bugzilla.mozilla.org/show_bug.cgi?id=1438945 and the good news is that it looks like it should be fixed soon.

dscrobonia commented 6 years ago

Going to look through that thread now :grimacing: do we know for sure it will solve our serviceworker single process bug? I wasn't totally sure if it was the exact same bug.

dscrobonia commented 6 years ago

Alright. I actually just caught up on this thread. Here is a linked, related thread that is specific to the service workers. https://bugzilla.mozilla.org/show_bug.cgi?id=1429805

I just added a comment to it, but @psiinon if you wanted to poke and prod there that would be great.

dscrobonia commented 6 years ago

I'm thinking we'll be able to work around this issue. Not 100% sure yet, but hopeful. Ideally Firefox would still fix, but we'll see.

psiinon commented 5 years ago

So https://bugzilla.mozilla.org/show_bug.cgi?id=1438945 says its fixed in Firefox 65 - we should double check to see if this is all ok now...

dscrobonia commented 5 years ago

How exciting! I'll need to investigate...