Published in Web Development on Thursday, February 24th, 2005
Watching the hits pile up on the feeds for this weblog, I realized that I should probably do something about the fact that my feed delivery function does not deal with headers, and that I am probably burning up more bandwidth then I need to. What to do? Some answers given and a little help requested below.
When I first noticed how many hits were coming through for this sites feeds, I figured that I would simply use a service like Feedburner and any bandwidth issues would be solved. However, after some searching I realized that I should deal with the real problem, and take care of the headers for my feeds.
So this is the solution that I will use. Great.
While the above solution will deal with the problem at hand, I did get around to trying out Feedburner and I must say that I like some of the features that they offer.
So I can take care of my bandwidth problem with conditional Gets, and get some nice features by using Feedburner, but what do I do now about my feed URIs?
When you burn a feed with Feedburner, they give you a feed address from their server that has your new "Feedburner" feed, and this is what you want to deliver to your subscribers.
Ideally, you want to redirect the feed URI that you have been using (i.e. the one on your domain) to the new Feedburner feed in a transparent manner. That is, you want
http://www.mysite.com/feed to return the feed from
http://feeds.feedburner.com/my-feed without anybody having to know about it.
The answer, apparently, isn't so clear. Thankfully, Feedburner suggests using a 302 response to redirect user-agents to their feed.
An issue arises, however, when I tried out this solution in a feedreader. Well, in one feedreader really and that's where I need some help from the readers of this weblog.
The result was fine in the first two services. I subscribed to the local test feed url, and the feedburner feed was downloaded.
Opera also downloaded the feed, however it switched the subscription URI of the feed to the Feedburner URI!!
As you can imagine, this is not good at all. As Opera stores the Feedburner feed address, Opera users will lose my feed should I choose to discontinue using Feedburner in the future.
So what I am asking is that some of you could test out other feedreaders to see if they demonstrate the same behaviour.
Try pointing your reader to the following feed, and let me know if it downloads the feedburner feed (if so, the link at the bottom of an entry in the feed will start with
http://feeds.feedburner.com/) and if your reader changes the subscription URI to the Feedburner URI, or if it leaves it intact.
Please let me know in the comments if it works as it should and what feedreader you are using. Users of Bloglines and Feedness need not worry about this, as I have already tested them. I'll sum up the results once we have a decent set. Thanks for the help!
I started freelancing by diving in head first and getting on with it. Many years and a lot of experience later I was still able to take away some gems from this book, and there are plenty I wish I had thought of beforehand. If you are new to freelancing and have a lot of questions (or maybe don't know what questions to ask!) do yourself a favor and at least check out the sample chapters.
Like the other books listed here, this provides a great reference for the PHP developer looking to have the right answers from the right people at their fingertips. I tend to pull this off the shelf when I need to delve into new territory and usually find a workable solution to keep development moving. This only needs to happen once and you recoup the price of the book in time saved from having to develop the solution or find the right pattern for getting the job done..