Tools · Counter
Count from a header
A generic demo: read a total from a public WordPress REST endpoint via the X-WP-Total header.
Articles published by my automation
–
in total
–
this month
The request asks for one post only (per_page=1) and the browser reads the total count from the X-WP-Total response header, so no article text is downloaded. The "this month" figure repeats the request with an after= date filter set to the first day of the current month (UTC).
Data sources & privacy
The counts are read from the public REST API of a WordPress site I run; the address is kept in a constant in the script. The server must list X-WP-Total in Access-Control-Expose-Headers for a browser to read it. Requests go straight from your browser to the named service, without cookies or an API key; that service sees your IP address as in any web request. Everything received is treated as untrusted text and shown with safe DOM methods. Nothing is sent to this site, and this preview page is not indexed by search engines.