News for hackers. Stuff that matters.
Re:Twitter preconnects to the wrong domains by GoblinSlayer on Tuesday October 27, 2020 @11:07AM (#24908126)
As I understand the docs, they can be killed any time, e.g. when their site is left, then they aren't different from page scripts. Well, it doesn't look like they solve any problem either.
Re:Twitter preconnects to the wrong domains by detaro on Tuesday October 27, 2020 @11:21AM (#24908255)
The most crucial thing they solve is giving websites access to their cached pages, and they can thus show cached content while also making a request for new data in the background, still provide cached functionality while the device isn't connected to the internet, ...

In the wider concept of "PWA" (Progressive Web Apps), they also are used to enable webapps to act a bit like local apps if the user opts in - a user can add them to the homescreen, and they then are launched just like normal apps (but still sandboxed in the browser). An example that does this quite well is the Web-IRC client "The Lounge" - you can open and use it in the browser, but also pin it as a standalone app, including support for push notifications etc if you allow that.

Re:Twitter preconnects to the wrong domains by dTal on Tuesday October 27, 2020 @06:40PM (#24912873)
Well, except there's nothing stopping a site from handing out a unique service worker with a hard-coded i.d. to every visitor. It's persistent state with behaviour, like a cookie that can do things.