Skip to content

Feature: RSS Protocol Support - WebSub #324

@la3rence

Description

@la3rence

What

WebSub is a w3c standard for RSS feed. Previously named PubSubHubbub.

Basically speaking, with WebSub, we can make our RSS feed automaticly pushed to the feed subscribers in real time. There's an agent called Hub providing an endpoint, which we should post a message that we have new feed items to, and this Hub URL will be existing in our RSS xml itself. RSS clients will got the notification from the Hub, then fetch the feed to refresh (but not all RSS clients support this feature).

https://www.w3.org/TR/websub/

Why

  • reduce network traffic (traditional solution is that client keeps fetching the feed xml continuously, like 30 minutes interval)
  • make readers get the article feed faster (real time notification)
  • good for google seo

How

  1. Choose a Hub instance, e.g, this one is hosted by Google: https://pubsubhubbub.appspot.com/. (maybe we can host one by ourselves, like open-sourced https://websub.flus.io/ )
  2. Add this line in your RSS xml:
<atom:link href="https://pubsubhubbub.appspot.com/" rel="hub"/>

Or this format with Atom feed:

<link href="https://pubsubhubbub.appspot.com/" rel="hub" />
  1. When new feed item created, call an HTTP API to notify the Hub like "Hey, I got a new article created in my feed! Let's notify to our subscribers!"
curl -d "hub.mode=publish&hub.topic=https://lawrenceli.me/atom.xml" -X POST https://pubsubhubbub.appspot.com/

Test

https://websub.rocks/publisher

Reference

https://freshrss.github.io/FreshRSS/en/users/WebSub.html
https://blog.typlog.com/pubsubhubbub

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions