Editore"s Note
Tilting at Windmills

Email Newsletter icon, E-mail Newsletter icon, Email List icon, E-mail List icon Sign up for Free News & Updates

March 22, 2008
By: Kevin Drum

RSS QUERY....I have a question for any RSS gurus out there: Is there a way to set up my RSS feed so that it doesn't get published immediately? I'd like to have a 15-minute lag between the time I publish a post and the time the RSS feed becomes public.

Here's why. I try to edit my posts fairly thoroughly before I publish them, but I frequently continue editing for a few minutes after a post goes up. Sometimes it's to correct grammar and typos, sometimes it's because it just looks different when I see it on the screen and I realize I'd like to say something a little differently. In any case, it's not uncommon for me to continue editing a post for five or ten minutes after it first goes up.

But the RSS feed often goes out immediately, which means it doesn't match the post that's actually on the blog. I suppose one might say that I should just be more careful about editing and proofreading in Movable Type before I hit the Save button, but I'm just never going to achieve a level of total MT perfection. So: does anyone know if there's a way to delay the RSS feed a few minutes?

UPDATE: By the way, as long as I'm mentioning our RSS feed, here it is:


This is a full RSS feed, not a preview feed.

Kevin Drum 1:17 PM Permalink | Trackbacks | Comments (24)

Bookmark and Share

(waits 15 minutes before snarky comment)

Posted by: absent observer on March 22, 2008 at 1:27 PM | PERMALINK

[Please wait 15 minutes and hit refresh before reading this comment.]

I feel your pain. I'd like to know exactly the same thing for Blogger. Or, I'd like Blogger to have a feature where I can see the post on my blog, but nobody else can until I release it.

Posted by: bob5540 on March 22, 2008 at 1:41 PM | PERMALINK
if (get_the_time("U")-the_time("U")<900)
require (ABSPATH . WPINC . '/feed-rss2.php');
Posted by: James on March 22, 2008 at 2:08 PM | PERMALINK

Switch to Wordpress. Wordpress lets you save an entry as a draft that you can view before actually publishing it.

Posted by: zoof on March 22, 2008 at 2:14 PM | PERMALINK

First, thanks for the full feed. I had always used the one that the website picks up first (which is just the preview).

Second, I don't know that it doesn't. For instance, your update claus above appeared just fine in Google Reader. As did the "update" on the iPhone post. (Which apparently, as 30-something gay urban male, I'm immune to because I didn't think that was all that annoying. It just seemed like a perfectly logical way to use the iPhone. My baby boomer uncle carriers around a card in his wallet of what fish to order or buy. How old fashioned, eh?)

Posted by: Christopher / DC1974 on March 22, 2008 at 2:36 PM | PERMALINK

As Christoper said, thanks for the full feed. I've been using the excerpted one which can be annoying.

To the question, it depends on what blog engine/feedmaker you've got. James's code looks like a reasonable solution, though it appears to assume that you're using WordPress and know where to drop it in.

Posted by: david on March 22, 2008 at 2:44 PM | PERMALINK

Using your feed in Sage via Firefox, each post takes me directly to your post page, so I'm seeing your most up-to-date revision at the moment I check your feed. It may not be your last revision, but isn't that true for people who just visit your site directly also? I don't see how the feed is any different.

Posted by: jnfr on March 22, 2008 at 3:08 PM | PERMALINK

the preview feed was going to be the death of me. Thank you, thank, thank you for the full one.

Posted by: bend on March 22, 2008 at 3:21 PM | PERMALINK

thanks for the full feed...

Posted by: chicagojack on March 22, 2008 at 3:25 PM | PERMALINK

Some feed readers will go back and grab any changes next time they pull the feed. So often by the time the reader actually sees it, it has the relevant changes. NNW does this, I don't know about Google Reader.

Also, I believe if you use Feedburner then you usually get a bit of a grace period between when you publish it on your RSS and when Feedburner gets it and re-publishes it.

Posted by: Frank on March 22, 2008 at 3:32 PM | PERMALINK

KD I feel the same way, even though I only do comments. Sure I reread them, and check for grammer etc. But how many times one minute after posting do I want to change something? Far too often.

Posted by: bigTom on March 22, 2008 at 3:45 PM | PERMALINK

most feedreaders check for updates hourly any way so the likelihood of someone seeing a just posted entry via feed is the same as the likelihood of someone coming to the website and seeing a story before you've re-edited it.

Posted by: Manish on March 22, 2008 at 6:24 PM | PERMALINK

IIRC if you rebuild the front page in the MovableType control panel, it will rebuild the RSS/Atom feed too, so it would reflect the current published version (post-editing).
That's not quite what you asked for, but it would get the feed in sync with the final articles.

Posted by: charlie don't surf on March 22, 2008 at 6:36 PM | PERMALINK

You might be able to do it in MT if you use the dynamical publishing model.

Instead, the easiest might be to publish your RSS feed to a different directory and then have a cron job copy it over from time to time. It might also require a bit of tweaking to your templates.

Posted by: Harold on March 22, 2008 at 7:17 PM | PERMALINK

yay! i'll never visit this site in a browser again, cept for the comments! Been waiting for the full feed forever.

Posted by: beedee on March 22, 2008 at 7:59 PM | PERMALINK

Hey, does anybody know if there's an LJ feed?

Posted by: Caitlin on March 23, 2008 at 3:38 AM | PERMALINK

is this MT 3 or 4? Ignore the comment about WordPress: MT does previews, too. You could either work it out in the template for the full feed, with some conditional logic that checks if an entry is 15 minutes old or not, or (depending on the access to the server) set up a "cron job" to run every 15 minutes. you'll need something like tim appnel's mt-rebuild (unless something similar ships with 4?), too, to be able to specify which template you want to rebuild, and you should uncheck the box on the feed template that says, "rebuild this template automatically".

if you're not on 4 yet, it's getting pretty stable and does a few new tricks.

Posted by: full time on March 23, 2008 at 8:36 AM | PERMALINK

Caitlin: there's an LJ feed here. Not sure whether it uses the "right" feed, but I haven't had any problems with it so far.

Posted by: Dallan on March 23, 2008 at 3:25 PM | PERMALINK

Full feed! Yay!

Posted by: Vespe on March 23, 2008 at 4:41 PM | PERMALINK

Hey everybody: how go I add Drum's RSS to my igoogle page?

Posted by: goethean on March 23, 2008 at 6:33 PM | PERMALINK

Than you, Dallan!

Posted by: Caitlin on March 23, 2008 at 8:03 PM | PERMALINK

Well, I know how I'd do it on my blog, but I don't run MT. I suspect that for you, the post date and time are stored in the database entry that contains the post text. If you can figure out where you're querying the database for the posts to include in the RSS feed, you could always calculate T = [current time - 15 minutes] and add a "WHERE PostDateTime < T" to the query, where [PostDateTime] is whatever that database column is called.

Of course, that entails a willingness to dig through and modify PHP code, which I suspect you weren't interested in doing. Who admins your site? It wouldn't be too hard to fix if somebody could get at the source of your current installation.

Posted by: Dave Fried on March 24, 2008 at 11:10 AM | PERMALINK

You do also realize that you are displaying people's email in plain text, right? That sucks, dude.

Posted by: Dave Fried on March 24, 2008 at 11:12 AM | PERMALINK

>>yay! i'll never visit this site in a browser again, cept for the comments!

See this is the big case against full feeds for money-making sites or those that want to be. Not coming to the site means no view of advertisers. You can put a stats counter in your feed but then the stats don't reflect the correct numbers to advertisers.

Note, I have a full feed but if I was trying to make some serious $$$ I'd be concerned by this type of comment.

I also don't use RSS feeds much at all, far preferring to visit sites.

Posted by: Temple Stark on March 24, 2008 at 3:48 PM | PERMALINK



Read Jonathan Rowe remembrance and articles
Email Newsletter icon, E-mail Newsletter icon, Email List icon, E-mail List icon Sign up for Free News & Updates

Advertise in WM

buy from Amazon and
support the Monthly