How it works

On the front end the plugin loads one small script module, which waits until the browser is idle. Values are kept only in the visitor’s own browser, in IndexedDB through the shared idb-keyval module. Nothing is sent to the server.

Per-page fields

Fields matching the local selectors (by default #comment) are saved as the visitor types, keyed by the page URL without its fragment and by the field’s ID, so they need an ID. If the visitor comes back to the same page before submitting, the text is put back. Submitting the form clears it.

Site-wide fields

Fields matching the global selectors (by default input[type="email"] and input[autocomplete="name"]) are saved when they change, keyed by the selector, and filled in on any page of the site where a matching field is empty. They’re kept after submitting. If a field matches both lists, it is treated as site-wide.

A saved value only fills an empty field. Passwords, hidden fields, files, checkboxes, radio buttons and buttons are never stored, and only fields inside a form are handled.

Filters

The idb-keyval library

The module imports idb-keyval. When LH idb-keyval is active, every plugin shares its copy. Otherwise the plugin registers its own bundled idb-keyval 6.3.0, and Site Health and the Plugins screen say so. Requires WordPress 6.7 or later, for script module data.