# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 1
# self = https://watcher.sour.is/conv/coeihnq
I've got a question to all fellow Atom feed authors out there: Do you know of a reliable way to use relative URLs in Atom feed entry contents? My motivation is to cut down the feed size in bytes by avoiding all this repeated base URL information for my nature photo feed.

I tried to switch from absolute URLs to relative ones and set <content type="html" xml:base="…">, but that didn't work out at all. I should have used <base> in <content type="html"> instead. No luck, either. In the Firefox extension Feed Preview the feed URL is used to resolve all the links which resulted in tons of dead links, because the base URL and feed URL are quite different.

In Newsboat and Vivaldi's feed view this worked, though. Newsboat implements several mechanisms to resolve URLs, e.g. <link> and even xml:base attributes, but unless I didn't miss it, there's no special handling for <base> tags in the <content>. Not sure on the exact algorithm Vivaldi implements.

I simply cannot find any official documents explicitly stating relative link resolution strategies. Section 2 of the Atom specification explicitly allows the use of xml:base:

| Any element defined by this specification MAY have an xml:base
| attribute [W3C.REC-xmlbase-20010627]. When xml:base is used in an
| Atom Document, it serves the function described in section 5.1.1 of
| [RFC3986], establishing the base URI (or IRI) for resolving any
| relative references found within the effective scope of the xml:base
| attribute.
|
| — https://www.rfc-editor.org/rfc/rfc4287#section-2

But that only counts for XML and not HTML, as the Feed Preview author pointed out to me after I sent him an e-mail.

To make things worse, the W3C Feed Validator issues a warning when using <base> in the <content>:

| content should not contain base tag

The explanation is of completely generic nature and doesn't help a bit in this particual instance.

Both the issued warning and the lack of documents describing URL resolution heavily suggest that this is not a bug in the Feed Preview but rather some implementation detail that might just work, or not. I wasted several hours with a mate this evening to experiment and read specs. No result, though. Thus, I reverted back to absolute URLs. Quite sad, can it be true that this simply doesn't work reliably? Any hints and thoughts are greatly appreciated!