Digital Sovereignty for everyone

LH Beacon

LH Beacon is a small shared beacon API for the front end of a WordPress site. Any plugin can queue a payload in the browser, and LH Beacon sends everything queued in a single request when the visitor hides or leaves the page. On the server it hands each payload to whichever plugin is listening for it.

It exists so that plugins needing to report something when a visit ends (time on page, last seen, unsent state) do not each add their own unload handlers and requests, and so logged-out pages no longer need the Heartbeat API, with its jQuery and admin-ajax overhead, just to say a visitor was here.

LH Beacon is deliberately pure infrastructure. It knows nothing about what rides on it: it checks only the request itself (same origin, size, a per-IP rate limit, and a nonce that pages left open or served from cache refresh automatically), and every consuming plugin validates and stores its own data. Its script is registered but never loaded on its own; it appears only on pages where a plugin’s script depends on it.

If you like this plugin please consider making a donation to further development

Install LHero.org

lhero.org

Open it straight from your home screen, full screen and quicker to load.

  1. Tap the Share button . If you cannot see it, tap ••• first.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add.
  1. Tap the browser menu â‹®.
  2. Tap Install app or Add to Home screen.
  1. In the menu bar, choose File, then Add to Dock.

Use your browser's menu to install this site or add it to your home screen.