Vanilla Breeze v0.7.4

Vanilla Breeze v0.7.4 released

0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…

Read the release notes

ping

Hyperlink auditing: when a link is followed, the browser POSTs a small notification to each listed URL while it navigates. Firefox ignores it by default.

Overview

The ping attribute lists URLs to notify when the user follows a link. The browser navigates straight to the link's href and, in parallel, sends a POST to each ping URL. There is no redirect hop and no script. Because the tracking URL is in the markup, users and extensions can see it, which was the point of the design.

Applies to: <a> and <area> elements that have an href.

There is no live demo: the ping is a background request that only shows up in DevTools (Network panel, type "ping"), and it needs a server to receive it. The examples show the markup and what is sent.

Values

ValueBehaviour
One URLOne POST when the link is followed.
Space-separated URLsOne POST to each.
Absent or emptyNo pings.

Relative URLs resolve against the document. URLs that are not http: or https: are skipped, and so is everything if the href cannot be parsed.

Examples

Outbound link tracking

Image map areas

What the browser sends

SituationHeaders
Ping URL is same-origin with the pagePing-From and Ping-To
Ping URL is cross-origin, page is not HTTPSPing-From and Ping-To
Ping URL is cross-origin, page is HTTPSPing-To only

Pings never carry a Referer header. The body is always the string PING: put any context you need in the ping URL's query string.

In Vanilla Breeze

  • Analytics sets it for you. When VB analytics is enabled, it adds ping to outbound a[href^="http"] links (pointing at its click endpoint) unless the link already has one or sits inside [data-vb-no-track], and falls back to navigator.sendBeacon() in Firefox and Brave, where ping is off. See src/lib/analytics.js and data-vb-no-track. Analytics is off inside iframes, so the demos on this site never get it.
  • The sanitiser removes it. src/lib/sanitize-html.js drops ping from untrusted HTML (markdown, comments, chat) in every profile, so user content cannot add tracking beacons.
  • Not the same as <markdown-viewer ping>. That is a component attribute: the viewer sends render metadata with sendBeacon after loading. It is unrelated to link auditing.

Accessibility

  • The attribute does not change how the link is announced or activated. Keyboard activation sends the ping just like a click.

Security

  • It is tracking. Tell users in your privacy policy, and do not add ping for visitors who have opted out: the browser sends it whenever the attribute is present.
  • Cookies are sent. Ping requests use credentials mode include, so a third-party ping URL receives that site's cookies (subject to the browser's third-party cookie blocking).
  • Strip it from user content. Untrusted HTML with ping can make your readers notify someone else's server; VB's sanitiser removes it.

Browser support

Chrome 12 and Safari 6 send pings. Firefox has the attribute but does nothing unless the user enables browser.send_pings; Brave and many content blockers also suppress pings (MDN browser-compat-data, November 2026). Treat ping as best-effort and pair it with navigator.sendBeacon() where counts matter.

Gotchas

  • Only followed links. No ping for <button>, form submissions, window.open() or location changes.
  • Responses are ignored. The browser discards the response body; the endpoint should reply quickly with 204.

Related

  • referrerpolicy — how much of the page URL a navigation reveals.
  • rel — noreferrer and other link types.
  • data-vb-event — VB analytics events for clicks that are not navigations.
  • Analytics — VB's analytics subsystem.
  • <a> and <area> — the elements.

Which to choose

  • Counting outbound clicks with no script — ping, accepting that Firefox and blockers skip it.
  • Reliable counts or custom data — navigator.sendBeacon(), or VB analytics, which uses both.
  • Avoid redirect URLs (/out?url=...): they add a hop, hide the destination and can become open redirects.
↑