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
- 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/ )
- 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" />
- 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
What
WebSubis a w3c standard for RSS feed. Previously namedPubSubHubbub.Basically speaking, with WebSub, we can make our RSS feed automaticly pushed to the feed subscribers in real time. There's an agent called
Hubproviding 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
How
Hubinstance, 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/ )Or this format with Atom feed:
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