Partytown
Web framework / library · Free
A runtime for moving third-party web scripts to a worker: it helps offload a site's main thread while preserving required browser interactions.
Also known as: QwikDev/partytown; partytown; party-town

What you can use for free
Code and local use under MIT.
Paid features and costs
Computing resources, self-hosting, and external services are paid for separately if used.
Access and limitations
Code and local use under MIT. Computing resources, self-hosting, and external services are paid for separately if used.
Use cases
- Move suitable third-party scripts to a worker
- Connect worker execution and test the scripts' required browser interactions
Example workflow
A possible workflow; this is not a report of hands-on testing.
Move suitable third-party scripts to a worker.
Before you start
- Web application source code and the intended workflow.
- The project's framework and runtime version.
Steps
- Identify page scripts that load the main thread.
- Connect worker execution and test the scripts' required browser interactions.
- Add real data and error handling; check the production build.
Check your result
- The workflow works after a page refresh and with invalid data.
- The bundle, server rendering, and supported browsers suit the project.
Choosing Partytown
Move suitable third-party scripts to a worker
Choose this when
- Move suitable third-party scripts to a worker
- Connect worker execution and test the scripts' required browser interactions
Things to consider
- Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.
- Terms of use: MIT for the code; dependencies have separate licenses.
- event.preventDefault in a worker handler does not cancel an already completed main thread action. Cross-origin iframes created by Partytown scripts have separate cookie/storage restrictions; scripts lacking required CORS headers need proxy configuration.
Frequently asked questions
What can you use for free in Partytown?
Code and local use under MIT.
What additional costs might arise with Partytown?
Computing resources, self-hosting, and external services are paid for separately if used.
What terms of use matter for Partytown?
MIT for the code; dependencies have separate licenses.
How do you get started with Partytown?
Identify page scripts that load the main thread. Connect worker execution and test the scripts' required browser interactions. Add real data and error handling; check the production build.
Which third-party scripts suit Partytown, and what limits arise?
Partytown moves selected resource-intensive scripts into a worker. The official guide considers event handlers with background data sending suitable, while scripts with extensive DOM insertion and complex interfaces are less suitable. Enable scripts one at a time; cross-thread DOM operations are intentionally delayed and batched.
License
MIT for the code; dependencies have separate licenses.
MIT — permissive license
You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.
License termsTechnologies and topics
- Partytown
- web
- Development