Primoz Rome
Primoz Rome

Reputation: 11031

Questions on building RSS feed

I am building RSS feed for the first time and I have some simple, direct questions that I was unable to find on the web, well at list in a sense that would be clear to me. Can you help me understand following

Upvotes: 1

Views: 263

Answers (2)

erwan
erwan

Reputation: 1305

  • You should put every article, but the best is to provide different feeds for different categories, even search keywords. You can build it like any dynamic page, with a querystring.
  • that's not super important, you can put whatever. I don't think may feed readers use it.
  • theoretically it's the date the content changed. So the date of the latest updated item should work.

Something super important, since people are going to do polling on this page (meaning a lot of requests on the page) - Cache it on your server - Serve and Etag header and/or a LastModifiedDate. That way your server can respond with just a "not modified" if the client has it in cache already.

Upvotes: 0

MarcinWolny
MarcinWolny

Reputation: 1645

Which items should I include in RSS generation?

You should have one generic feed with all the new articles you post (for example: news). Additionally if you got your webpage split into categories, or you have some specific feeds (eg. calendar of the events) then it's good to create additional separate RSS for each one of them

What value should I set for pubDate? I do not quite understand how to apply this to my feed. I have new articles daily, should I set the pubDate to let say 06:00 AM today and update it every day?

Always set pubDate to the time when your news/articles went online. So if you have new articles daily pubDate should be a date when they were released to the public. Not random hour in the morning. Not the moment when you started writing them.

lastBuildDate: if I understand this right is the date of the latest updated item?

lastBuildDate is the most recent date when any of the results was posted or modified. Usually you should skip it - especially if your lastBuildDate will be simply a most recent pubDate. It's an optional parameter.

I use lastBuildDate only for calendar RSS feeds to show when the calendar was updated (as in calendars you not only add new entries but also often edit existing).

Upvotes: 2

Related Questions