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
  1. 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>
  1. 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 : ?>
          <strong><!- -
    </strong>        <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
        <strong>  - -></strong>
  1. Save file. That’s it.

ATOM Feeds

  1. Open file.
<wordpress-root>/wp-includes/feed-atom.php
  1. Find following line
<summary type="<?php html_type_rss(); ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
  1. 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>
- ->
  1. 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
  1. 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>
  1. 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>
- ->
  1. 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.


About Author

Rahul Bansal

Rahul Bansal

I am a geek (wordpress), blogger (tech) & entrepreneur (rtCamp)