| Internet-Draft | Well Known Button.json | March 2026 |
| klfr & LunarEclipse | Expires 30 September 2026 | [Page] |
This document specifies the well-known URI /.well-known/button.json,
which describes a web site's "buttons". Buttons are usually 88x31 pixel
images representing the web site with text, logos, artwork, and
animations.¶
/.well-known/button.json files facilitate sharing buttons between web
site owners and alleviate issues commonly encountered when doing so. By
utilizing a standardized, machine-readable format, automated tools can
also utilize the provided information.¶
This note is to be removed before publishing as an RFC.¶
Status information for this document may be found at https://datatracker.ietf.org/doc/draft-filmroellchen-lunar-well-known-button/.¶
Source for this draft and an issue tracker can be found at https://codeberg.org/LunarEclipse/well-known-button.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 30 September 2026.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
"Buttons", in the context of this specification, refer to a certain type of common image on the Web. Buttons are graphics, usually 88 pixels wide and 31 pixels high, featuring text, logos, artwork, as well as animations. The purpose of a button is to represent the web site or its owner(s)/author(s), often using minimal information to do so, owing to the low resolution available. For this representational purpose, buttons are usually intended to be included on other web sites, most commonly in a footer or other dedicated section. This way, web site owners may show their affiliation with, or appreciation of other's web sites.¶
Buttons originate from the early days of the Web as a form of banners, originally representing the site or technology used to host a particular home page. The 88x31 format, also named "Micro Button", originated with the free hosting provider GeoCities.com and their mandatory advertising banner. For a detailed historical account, see [Tekeye]. Buttons have seen a renewed surge in popularity in the 2020s with certain subcultures.¶
The goal of this specification is to provide a clearly defined standard for web site authors who wish to share web site buttons with other web site authors and end users, and lay out a format for a common endpoint that can be used to fetch and/or embed the buttons. To this end, this specification introduces a new well-known [RFC8615] URI utilizing a standard JSON format to specify one or more buttons.¶
The intended use cases are:¶
to share buttons in a standardized way¶
to avoid issues with crediting the original button author(s)¶
to avoid issues with button authors' consent to including buttons on other pages¶
to facilitate automation around inclusion of buttons, including but not limited to:¶
The specification aims to be easy to implement for web sites using shared hosting providers, which are unable to change HTTP response headers and cannot host extension-less files.¶
Accessibility is a primary concern of this specification. Images and fast animations are notoriously inaccessible to users with vision impairment, light-sensitivity, and other disabilities. This specification attempts to combat that by requiring image descriptions, and providing a standard mechanism for selecting between multiple versions of a button for accessibility purposes.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
A server is any web server providing a /.well-known/button.json file.¶
A client is any program accessing the /.well-known/button.json of a
server. Clients include other webservers, automated programs, as well as
programs manually invoked on behalf of a user.¶
An animated image (as opposed to a static image) is an image which has multiple frames of nonzero and non-infinite length, where at least one of the frames is visually distinct from the others. Examples:¶
A GIF image with three frames, all containing different text in front of the same background, is animated.¶
A WEBP image with two very distinct frames is animated.¶
An AVIF image with several hundred frames and over two minutes in runtime, featuring a "gloss" effect that very slowly moves across the image, is animated.¶
A GIF image abusing a frame time of zero to show more than 256 colors at once is animated, as almost every modern program restricts the frame time to a minimum of 10ms.¶
An AVIF image with five frames, all of which are identical, is not animated.¶
A GIF image with ten frames, all of which only contain imperceptible color differences in a few pixels, is not animated.¶
An APNG image with two thousand identical frames is not animated.¶
A GIF image with a single frame is not animated.¶
A typical example is as follows:¶
{
"$schema": "https://codeberg.org/LunarEclipse/well-known-button/raw/branch/main/drafts/draft-filmroellchen-lunar-well-known-button-00.schema.json",
"default": "my.web site",
"buttons": [
{
"id": "my.web site",
"uri": "https://my.web site.example.org/my.web site.png",
"alt": "Button to my web site!",
"link": "https://my.web site.example.org",
"sha256": "66a421c7e726e9de99eeb88c57b93b49278d64b2a4602a6f90f7d64baee154cf",
"hotlink": true
}
]
}
¶
A minimal example:¶
{
"$schema": "https://codeberg.org/LunarEclipse/well-known-button/raw/branch/main/drafts/draft-filmroellchen-lunar-well-known-button-00.schema.json",
"buttons": [
{
"id": "some button id",
"uri": "https://example.com/res/my-button.gif",
"alt": "button saying example.com"
}
]
}
¶
And an exhaustive example:¶
{
"$schema": "https://codeberg.org/LunarEclipse/well-known-button/raw/branch/main/drafts/draft-filmroellchen-lunar-well-known-button-00.schema.json",
"default": "8b556a30-c5d9-4117-88a5-b779a3f2f567",
"buttons": [
{
"id": "8b556a30-c5d9-4117-88a5-b779a3f2f567",
"groupId": "mainbutton",
"uri": "https://web site.example.com/res/my-button.png",
"alt": "button saying example.com with black text on a white background",
"caption": "Example web site",
"sha256": "e35a78bcb7f9b9cc0c3929d1763b96b6013071b0f9950886a20d2bcc0e943612",
"link": "https://web site.example.com/",
"colorScheme": "light",
"animations": "none",
"contrast": "more",
"license": "CC-BY-SA-4.0",
"licenseText": "Copyright 2024 by the Example Author",
"imageRendering": "pixelated",
"hotlink": false
},
{
"id": "64dbf02d-44e0-4aa9-ad45-c4959eadd3db",
"groupId": "mainbutton",
"uri": "https://web site.example.com/res/my-button-dark.png",
"alt": "button saying example.com with white text on a black background",
"caption": "Example web site",
"sha256": "4598d79c6c1877aa9121c8b0845fe4e8f031684fabb09caa10357dfe5d295986",
"link": "https://web site.example.com/",
"colorScheme": "dark",
"animations": "none",
"contrast": "more",
"license": "CC-BY-SA-4.0",
"licenseText": "Copyright 2024 by the Example Author",
"imageRendering": "auto",
"hotlink": false
},
{
"id": "57ad38e5-94ad-4b64-a6bc-583f41b7c3b5",
"groupId": "mainbutton",
"uri": "https://web site.example.com/res/my-button-rainbow.gif",
"alt": "button saying example.com with black text on an animated rainbow background",
"caption": "Example web site",
"sha256": "2fecb1bbd1fdb1f8fa634632f9726f9bce7f653fe94cde59b616f4032b70a758",
"link": "https://web site.example.com/",
"colorScheme": "other",
"animations": "high",
"contrast": "standard",
"license": "LicenseRef-Commercial",
"licenseText": "Copyright 2024 by the Example Author, all rights reserved. You can include this button on your page but nothing else.",
"imageRendering": "smooth",
"hotlink": true
},
{
"id": "ee5cc4b3-b88b-4b1c-ae1f-fb9a3de063c9",
"uri": "https://web site.example.com/res/blog-button.gif",
"alt": "example.com blog button with some starts gently twinkling in the background",
"caption": "Example web site",
"sha256": "b2fe6da951362a7e3909390c5634fe4804cb845eddccad8dcea5819122f94be0",
"link": "https://web site.example.com/blog/",
"animations": "minimal",
"license": "CC-BY-SA-4.0",
"licenseText": "Copyright 2024 by the Example Author",
"hotlink": true
}
]
}
¶
This section has not yet been written, and the authors appreciate any input for it.¶
IANA will register the well-known URI /.well-known/button.json in the
well-known URIs registry [IANA-well-known] in conformance with the
requirements for this registration in [RFC8615]. The following
information is provided to facilitate the registration:¶
URI suffix: button.json¶
Change controller: IETF¶
Specification document(s): This RFC¶
Status: permanent¶
In case a JSON Schema registry is set up with IANA in the future, the
button.json Schema (Appendix A), as defined in this
specification and any of its updates and errata, shall be registered by
IANA with this JSON Schema registry.¶
Buttons are usually copyrightable artworks. As such, unauthorized copying and inclusion of a button is a legal offense in most jurisdictions. This specification does not supersede the legal frameworks for copyright, licenses and permissions, but it attempts to aid all involved parties in avoiding legal issues.¶
Publication of a /.well-known/button.json file, as per this
specification, implies a permission to download (copy) the linked-to
buttons, and include them on other pages, provided that a button's link
(as per this specification) is persisted. These are the minimal
permissions required to make the data in /.well-known/button.json
useful to third parties. This does not waive copyright and is not
comparable to stronger copyleft licenses. It is also not as legally
unambiguous as the license properties, so the use of these properties is
strongly RECOMMENDED.¶
The license and licenseText properties allow the button author to
provide a copyright license. In case the author is not provided in
either of those properties, it can be assumed to be the same as the
author of the web site's content, or the web site's owner.¶
It is RECOMMENDED that clients use SPDX tooling and human-in-the-loop
verification of both license and licenseText to verify that the
client's use of the button is allowed by the license.¶
The following licenses are RECOMMENDED for use in
/.well-known/button.json:¶
Any of the current Creative Commons licenses [CC], including CC BY,
CC BY-SA, and CC BY-ND. The no-derivative licenses including the
latter are closest to the default permissions implied with publication
of a /.well-known/button.json file.¶
A full list of standard licenses tracked by SPDX is available at https://spdx.org/licenses/.¶
Specifying the location of a button image in /.well-known/button.json
exposes it to automated scrapers, including malicious ones. If a web
server operator wishes to decrease the visibility of the buttons,
robots.txt [RFC9309] can be used to discourage scrapers from accessing
/.well-known/button.json, but since some scrapers do not respect
robots.txt properly, the web server may additionally need to block
certain user agents and IP addresses from accessing
/.well-known/button.json.¶
imageRendering CSS Injection
The imageRendering property may be set to an arbitrary string by a
malicious web site operator. Clients which use the property without
additional checks as part of the button's CSS properties (whether in
stylesheets or inline style in HTML), are subsequently vulnerable to
CSS or HTML injection attacks. Therefore, clients MUST NOT use this
property without validating it, and reject any unknown values.¶
Hotlinking buttons imposes an additional load on the server, as it has
to serve the button to every visitor of a client's web page, not just
its own page(s). Therefore, usage of the "hotlink": true setting
should be carefully evaluated, as even well-intentioned clients may
cause increased load on the server if their pages receive many views.¶
Malicious or careless clients may ignore the hotlink attribute and
always hotlink the button image. This scenario is no different from
ordinary HTTP Denial-of-Service attacks and should be addressed
similarly.¶
At a basic level, this can be done easily with jq:¶
jq '{ "$schema": "https://codeberg.org/LunarEclipse/well-known-button/raw/branch/main/drafts/draft-filmroellchen-lunar-well-known-button-00.schema.json", "buttons": . }' $old_filename > $new_filename
¶
You will no longer need special logic for your web server, instead the
new path for the file is /.well-known/button.json.¶
You may add a copy of the schema version matching your file in
/.well-known/button.schema.json.¶
You might want to add a default property, especially if you provide
multiple buttons.¶
You should consider adding the extra accessibility properties where the
default values aren't sufficient (especially animations).¶
The current schema is backwards-compatible with the 2024-06 one, adding only optional properties.¶
You should consider adding the new properties where applicable,
especially license.¶
This specification would not have been possible without the many
excellent ideas from various beings, most of which are listed under
Appendix "Contributors". The authors thank Arch Retriever in particular
for the original ./well-known/button.json idea.¶
Arch came up with the idea and created the original version of this specification.¶
Reina contributed the idea of an alt text property.¶
Sugar contributed ideas on how to make this specification more accessible to people using shared hosting services.¶
Seirdy contributed the idea of multiple versions of a button with different accessibility properties.¶
Soblow contributed examples and correction to the 2024 second draft, as well as the hotlink attribute.¶
Natty contributed the idea of a caption property distinct from the alt property.¶