Force Firefox To Display Your Full Feeds [Wordpress Hack]

There is a problem (or feature) in Firefox. For wordpress blogs and few other feeds it always show partial content making it hard to judge for a wannabe subscriber whether your are displaying full feed or partial feed.

Many subscribers just hate partial feeds and most of them are unaware of this default firefox behavior which I guess can’t be changed via some about:config hack.

As a blogger if you care about your subscriber count, you can use following hack to force firefox to display your original full feed.

RSS 2.0 Feeds (default wordpress format)

1. Open file.

<wordpress-root>/wp-includes/feed-rss2.php

2. Find following lines

<?php if (get_option('rss_use_excerpt')) : ?>
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
<?php else : ?>
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>

3. Now comment out last line. We can remove it too but commenting is safe option. So it will look like…

<?php if (get_option('rss_use_excerpt')) : ?>
          <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
<?php else : ?>
          <!- -
            <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
          - ->

4. Save file. That’s it.

ATOM Feeds

1. Open file.

<wordpress-root>/wp-includes/feed-atom.php

2. Find following line

<summary type="<?php html_type_rss(); ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>

3. Now comment out last line. We can remove it too but commenting is safe option. So it will look like…

<!- -
<summary type="<?php html_type_rss(); ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
- ->

4. Save file. That’s it.

RSS 0.92 Feeds

Fix is not needed.

RDF Format

1. Open file.

<wordpress-root>/wp-includes/feed-rdf.php

2. Find following lines

<?php if (get_option('rss_use_excerpt')) : ?>
<description><?php the_excerpt_rss() ?></description>
<?php else : ?>
<description><?php the_content_rss('', 0, '', get_option('rss_excerpt_length'), 2) ?></description>

3. Now comment out last line. We can remove it too but commenting is safe option. So it will look like…

<?php if (get_option('rss_use_excerpt')) : ?>
<description><?php the_excerpt_rss() ?></description>
<?php else : ?>
<!- -
<description><?php the_content_rss('', 0, '', get_option('rss_excerpt_length'), 2) ?></description>
- ->

4. Save file. That’s it.

What is the problem? (Technical Details)

RSS 2.0 &  ATOM  have exclusive support for summaries. In RSS 2.0, actual content is placed in content element while summaries can be optionally put in description element. Similarly in ATOM, actual content is placed in content element while summaries can be optionally put in summary element.

Now other browsers displays data from content but Firefox uses data in description (for RSS 2.0) or summary (for Atom). These element are optional so by commenting them we force firefox to use data in content field. As both description & summary are optional element in their formats at item/post levels, feeds are still valid. In fact, blogger.com by default don’t use these elements so this problem does not arise there.

Actually this can be seen as a feature too as you can see entire feed without much scrolling. But firefox should somehow tell a user that full feeds area also available whenever applicable.

As a firefox user I am still looking for a way to solve this in firefox as I prefer full feeds all the times.

For FeedBurner users…

Above modifications are reflected instantly at wordpress end but if you are using FeedBurner to burn your feeds, you can ping FeedBurner here and ask them to clear their cache.

Related posts:

Comment RSS · TrackBack URI

14 Comments (including Pingbacks/Trackbacks) so far »

  1. #
    Raj on January 13, 2009

    Excellent piece of information. Thanks a lot as I was struggling with this for the past couple of days.

  2. #
    Raj on January 13, 2009

    Now my feedburner feeds are showing the full text in firefox, but when I view the xml file it still shows the excerpt only. How can i fix this?

    http://feeds.feedburner.com/NewGadgetsGuru?format=xml

  3. #
    Rahul Bansal on January 15, 2009

    @Raj
    Clean your cache. I just checked link you posted above and I can see full feed! :-)

  4. #
    Will on March 2, 2009

    I did the changes and Firefox still shows excerpts. A friend even sent me copies of his edited files which work on his site and I just replaced mine with those. Pinged Feedburner. Cleared my cache. Still no joy. Full text in email delivery, in IE , but not in Firefox. Any idea why this will not work on my site. WordPress version 2.7.1. Using the Feedburner Feedsmith plugin.

    Thanks.

  5. #
    Will on March 2, 2009

    I figured it out. It is a Feedburner problem. Pinging does not work and for some reason Feedburner would not update so it got the edited files. Even after 2 days it was not working. So what I did is create a new temporary feed at Feedburner and pointed it to my sites feed. That caused a hard reset of some kind at Feedburner and everything started working fine. Then I just deleted the new Feedburner feed.

    Hope this helps anyone else that may have the same issue.

  6. #
    karthick on March 12, 2009

    Excellent Man.Many many thanks for you!!!!!!!!!!!!!!!!

    Wonderful explanation

  7. #
    Rahul Bansal on March 19, 2009

    @Will & Karthick
    Thanks for your feedback guys. :-)

  8. #
    Julie on April 13, 2009

    its notr working for me too. Like Raj its still showing the only two lines of my xml feed in firefox browser

  9. #
    Nehemoth on April 19, 2009

    Sadly isn’t working for me.

    After edit the files, I went to Internet explorer, open the feed but for some reason IE don’t recognised this <!- -

    Thank you anyway

  10. #
    Rahul Bansal on April 22, 2009

    @julie & Nehemoth
    There may be some extra newlines inserted in the beginning. Find out which theme/plugin are adding them and remove them.

Leave a Comment

 Name (Required)
 E-mail (Required)
 Website

Comment:

  OR Use forum if posting unrelated to this topic.
[Note: All comments will be moderated as per our comments policy.]

Subscribe without commenting


4 Trackbacks/Pingbacks

  1. 8 Wordpress Plugins for Feed Subscribers | Welcome To Devils Workshop on August 9th, 2008
  2. Why Firefox won’t display full feed(WordPress) - Freeware Log on February 5th, 2009
  3. 2null » Blog Archive » Trotz Auszug Feeds in voller länge on March 21st, 2009
  4. Why Firefox won’t display full feed for WordPress « FreewareLog on June 15th, 2009