Updated in 2026

Browser mining: archived XMR tutorial

This post originally explained how to add an XMR web miner to a website. I have converted it into an archived, educational guide because the old approach is no longer a good recommendation: it depends on fragile mining scripts, creates a poor user experience and is commonly blocked by browsers, antivirus tools and content blockers.

The useful lesson

The interesting part is not the revenue promise. It is the engineering trade-off: a website can run heavy work in the browser, but doing so shifts energy cost, heat and performance loss to the visitor. That requires explicit consent, clear controls and a very strong reason.

That lesson is still valuable for modern web development. Any client-side task that consumes CPU for a long time, whether it is compression, image processing, cryptography or a game loop, needs a visible contract with the user. Hidden work is a product and security problem, not only a technical detail.

A safer pattern

For a modern educational page, show a simulation instead of connecting to a real mining pool.

The safer version should be local, reversible and transparent. It should state that no real cryptocurrency is mined, expose start and stop controls, and explain what a hash, a nonce and a difficulty target mean.

Review checklist

Before publishing any browser workload that can affect performance, I would review the following points. They are also useful for WebAssembly demos, video processing tools and expensive data visualizations.

Why this article stays online

Keeping the archived article is useful because it documents a real period of the web: projects experimented with mining as an alternative to ads, then the ecosystem pushed back because the user cost was too opaque. The current recommendation is to learn from the experiment without repeating the risky deployment pattern.

In this project the practical replacement is the educational proof-of-work simulator: open the simulator.