Skip to content

These docs are for Miniflare 2 which is no longer supported apart from critical security updates.
Please see the migration guide to upgrade to Miniflare 3, and the updated API docs.

Visit Miniflare on GitHub
Set theme to dark (⇧+D)

⚡️ Live Reload

Enabling Live Reload

Miniflare can automatically refresh your browser when your worker script changes.

$ miniflare --live-reload
live_reload = true
const mf = new Miniflare({
liveReload: true,

Miniflare will only inject the <script> tag required for live-reload at the end of responses with the Content-Type header set to text/html:

export default {
fetch() {
const body = `
<!DOCTYPE html>
<p>Try update me!</p>
return new Response(body, {
headers: { "Content-Type": "text/html; charset=utf-8" },