The Coil extension

Issue
Please give your comments and feedback at this issue.

The Coil extension is currently the only web monetization agent. It exists for Chrome and Firefox. A Safari version is currently not available. This page discusses its features.

The Coil extension was originally created for the old version of the Web Monetization specification. Meanwhile it supports the new version, but it will retain backward compatibility for now in order to give site owners some time to migrate.

In addition, as a practical implementation of the Web Monetization specification it had to take certain decisions on edge cases not covered by the specification.

New Web Monetization

The extension fully supports the new Web Monetization specification.

Old Web Monetization

The old Web Monetization version is deprecated. Do not write new scripts against it. They will stop working.

While, for now, old scripts written against the old specification will continue to work, support will cease somewhere in 2022. Documentation for version 1 can be found here.

Offline capabilities

If the visitor's browser goes offline the page can no longer send payment requests and the monetization stream stops. It resumes when the page goes back online.

This behavior might change in the future. For now, though, the extension does nothing while it's offline.

Backgrounding

If a browser window is placed in the background, for instance because the user places the focus on another page or application, the monetization stream should stop. Users cannot read the page, so they should not be charged. Pages that stream audio are an exception: they will continue to be monetized, since users continue to consume (part of) their content.

The extension listens to the visibilitychange event that fires whenever the visibilityState of the page changes. If it becomes hidden the monetization stream stops, while if it becomes visible the stream restarts.

visibilityState becomes hidden when no pixel of that window is currently visible on the screen. Thus, the following actions will send a window to the background:

If even a single pixel of the window remains visible the visibilityState remains visible and the page will continue to receive payments. This can lead to odd situations where users think they have sent a page to the background, but the monetization stream actually continues because a tiny sliver remains visible. The system is not perfect, but more fine-grained definitions of visible and invisible are extremely hard to implement, and will likely lead to many more false positives or negatives.

audio

Nick still has to implement this.

Browser windows that stream audio form an exception to these rules. They will continue to receive payments even if they are fully in the background, since users can still hear (part of) the content.