3 ms·
> With a web app, there is often no (straighforward) way to audit the code _before_ it's been downloaded and executed. Yes, often, but not in this case. With S
by twiss 9y ago
> With a web app, there is often no (straighforward) way to audit the code _before_ it's been downloaded and executed.
Yes, often, but not in this case. With Service Workers, you can notify the user before the code has been executed, and in most cases prevent or delay the update as well. That's why on https://www.airbornos.com/register https://www.airbornos.com/register, there's a checkbox marked "Notify me before updating Airborn OS." If you check that, Airborn OS will literally ask you whether you want to update.
Obviously, you understand the problem and how web apps usually work, but you still don't seem to understand my proposed solution. I would appreciate it if you attempt to do so before you loudly claim that I am wrong. Please see https://developer.mozilla.org/docs/Web/API/Service_Worker_API https://developer.mozilla.org/docs/Web/API/Service_Worker_AP... for a description of Service Workers, and http://blog.airbornos.com/post/2017/08/03/Transparent-Web-Apps-using-Service-Worker http://blog.airbornos.com/post/2017/08/03/Transparent-Web-Ap... for a description of my proposed solution.
- jimktrains2 9y agoService workers don't solve the problem. First, service workers themselves are updated outside a service worker, so that is code I can't easily intercept before it is executed. (And first page load as always.) Secondly, I still need to trust you not to make a mistake or not not be malicious over a long period of time making small tweaks that look innocent but over a year cause harm. Third, users will become fatigued if every update you make causes them to click ok.