Updated Service Worker implementation