Website Optimization by Relocating Third-Party Script Using Web Worker - Nur Rokhman M.Kom; Muhammad Pazrin Andreanor (IndoCEISS in colaboration with Universitas Gadjah Mada, Indonesia., 2026)
The use of third-party scripts such as Google Analytics, Meta Pixel, and Twitter Widget has become standard in modern website development. On a website, the main thread is the main line that handles the display process and user interaction in the browser. However, third-party scripts often overload the main thread and slow down page load time, degrading user experience. This study aims to optimize website performance by accelerating page load time, maintaining user interactivity, and improving resource efficiency. This research proposes an optimization method by moving the execution of third-party scripts to the Web Worker. By applying Script Offloading and Isolation, Inter-thread Communication, and Proxy Pattern methods, this system is able to safely move the execution to the background without affecting user interface interaction. The results of relocating third-party scripts to Web Workers on three types of websites (Blog, Company Profile, and E-commerce) showed an increase in performance score of up to 13.3% and a reduction in blocking time of up to 51.8%, although accompanied by an increase in memory of 1-4%. These findings indicate that using Web Worker significantly improves website performance with minimal negative impact on resource consumption.