Web Workers are a Web standard technology that allows script processing to be executed in background threads. Wijmo's 2018 v3 release introduced Web Workers to improve the usability of apps while generating a PDF.
In this case, the user can't cancel the PDF generation process. In addition, as long as the UI is frozen, we can't change the state of the button or display any helpful information like the progress rate. The user can only wait for a long time, with no feedback—a dissatisfying user experience.
Web Workers solve these problems neatly. Here's a look at the same grid, this time with Web Workers:
The heavy processing still takes a long time, but users can cancel processing (thereby avoiding the warning screen). In addition, we can change the button state and display the progress rate, providing vital feedback to users.
Let's look at the Web Workers operation with the sample below. Keep in mind that the app is saving 100,000 grid rows to a 3,500-page PDF—it's a large document with heavy processing. (I recommend running it on Chrome.)