Google uses the Service Worker cache to repeat searches, speeding up 2x
According to reports, Google Engineering Director Dion Almaer and Google Product Senior Director Ben Galbraith revealed that Google Search is using Service Worker to cache duplicate searches, which has doubled the search results.
Service Worker (Service Worker Thread) is a script that runs independently of the webpage in the background of the browser. It is characterised by being registered in the page and installed successfully. It runs in the background of the browser and is not affected by the page refresh. It can be monitored and intercepted. An HTTP request for all pages in the domain resolves the problem that JavaScript can only be single-threaded. Currently, Service Workers already have features such as push notifications and background synchronization, and in the future, it will support other features such as regular synchronisation or geofencing. Adding a Service Worker to a web application can significantly improve performance and even surpass all the best practices of traditional browser caching.
Almaer said that the mission of Google Search is to provide users with relevant results as soon as possible, so they put the most effort into deploying Service Workers because this can make Google search twice as fast as ever. But he also said that the current Service Worker is only used in Chrome for Android, and is 62 and higher, so only users who install the new version of Android Chrome can see the performance improvement. Galbraith added: ” Service Worker has been available for several years now, but for Search’s requirements — we’ve been continually optimizing implementations of Service Worker and also waiting for broader coverage as well.” Because other browsers don’t support Navigation Preload, the Google search team uses Service Worker technology to improve them as other browsers add the required functionality.