Skip to content
Zotonic
  • Start
  • Cookbook
  • Reference
  • Releases

Live search

Search across all Zotonic content

Type at least two characters

Results are matched against titles, summaries and topics as you type.

Scomp · mod_base
  • Reference
  • Frontend developer
  • Messaging and publish-subscribe
  • Server component
  • JavaScript
  • MQTT

worker

Module

mod_base

Start a named Cotonic worker from a template.

The required src argument names the worker module. Optional name, base, and args arguments set the worker name, Cotonic base worker, and JSON-encoded startup arguments. The generated script uses the request's CSP nonce.

For example:

{% worker src="js/my-worker.js" name="example" args=worker_args %}

Edit on GitHub

Related documentation

Scomp

live

Live-updating templates driven by MQTT topics.

Cotonic

Zotonic Cotonic models Cotonic

Zotonic Cotonic models These browser-side models extend Cotonic with Zotonic functionality. Each model has its own reference page:

Cotonic models

model/fileuploader Cotonic

model/fileuploader Queues browser files and uploads them in chunks through mod_fileuploader . The _fileuploader_worker.tpl include starts…

Cotonic models

model/dedup Cotonic

The dedup model implements message deduplication. It works by sending a message to the dedup model, the dedup model then relays…

Cotonic

Change log Cotonic

1.9.0 — Sep 1, 2026 — Diff — Docs — Download

Cotonic

Links Cotonic

Introduction to Incremental DOM

Cotonic

Models Cotonic

Because workers run as independent components it is not possible to directly call api's. Some api's are also not available to…

Cotonic

cotonic.mqtt Cotonic

The mqtt module provides functions to work with mqtt topics. The broker uses this module as the basis to provide its…

Cotonic

Cotonic Cotonic

Cotonic is a Javascript library which makes it possible to split the javascript code of your page into truly…

GitHub © 2026 Zotonic