Hacker News new | ask | show | jobs
by DriverDaily 1023 days ago
Wouldn't infinitely spawning web workers do the same thing as a zip bomb?

```

<script>

   const workerBlob = new Blob(['

        while (true) { console.log("this is a worker that will never stop") }

    '], { type: 'application/javascript' })

   const workerBlobURL = URL.createObjectURL(workerBlob)

   while (true) { new Worker(workerBlobURL) }
</script>

```

1 comments

The zip file is decompressed on the server, whereas that HTML/JS will be executed on the client
I see, I misunderstood