Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Link to RSS/Atom feed, relative, doesn't work in Firefox

I have a weird problem. I generate a HTML page, hosted let's say at http://www.x.com/stuff which contains

<head>
  <link type="application/atom+xml" rel="alternate" href="/stuff/feed"/>
  ..
</head>

The result is:

  • In IE7 all works well - you can click on the feed icon in the browser and the feed is displayed
  • In Firefox, view source, click on the linked /stuff/feed and you see the source of the feed, so that works as expected
  • In Firefox, view the page (not source), then click on the feed icon in the address bar, I get an error that it can't retrieve the URL feed://http//www.x.com/stuff/feed

So the problem is, that it's appending feed:// to the front of the URL and then taking out the colon : after the http. I understand that feed: is HTTP anyway so perhaps the adding of that isn't a big problem.

But anyway, the fact is, that URL Firefox generates out of my <link> tag doesn't work.

I have considered making the URL absolute, but I haven't found any evidence that those URLs have to be absolute, nor can I understand why that would be the case. And for various reasons it would be inconvenient in my code to generate an absolute URL. I can do it if necessary but I would prefer to see proof (e.g. specification, or Mozilla bug report) that it's necessary before making my code messy

What do you think? Does anyone know of any evidence that the URL should be absolute? Or am I doing something else wrong? It seems such a simple/obvious tag, where nothing could go wrong, but I can't get it to work.

like image 604
Adrian Smith Avatar asked Dec 14 '10 11:12

Adrian Smith


People also ask

How do I use RSS feeds in Firefox?

In the Firefox browser, the Feed Reader start page opens. Choose „Add a new Feed“ to subscribe to our RSS Feed (figure 6). A new dialog box opens. In the upper line at “Feed URL”, please enter the URL of our RSS Feed: https://www.dwd.de/aviation-rss.

How do I find my RSS feed in Firefox?

Want my RSS is a Firefox extension that aims to simplify this task. Install the add-on and visit any web page. You'll notice an RSS icon (next to the bookmark icon) in the address bar. Click on the icon and a small pop-up appears, that lists the available RSS feeds.

What is Atom link in RSS feed?

RSS/Atom feeds give good hints about where to find the most recently updated pages. If your website provides an RSS or Atom feed, our crawler will download it to find new links on your site to index first. This is particularly useful when Site Search is doing an incremental update of your website.

What is RSS and how do you use it?

An RSS (Really Simple Syndication) feed is an online file that contains details about every piece of content a site has published. Each time a site publishes a new piece of content, details about that content—including the full-text of the content or a summary, publication date, author, link, etc.


1 Answers

I had the same problem. IT was caused by the proxy server at work that my web traffic was going through. Firefox changed "http://server.tld/feed-url" to "feed://http//server.tld/feed-url". Since the web proxy that all my http traffic is going through does not recognize the "feed://" protocol, it rejects my request as invalid.

The only workaround I have found so far is to manually configure the proxy settings in Firefox. Right now you probably have them automatically configured by your system. If you know your proxy information, you can instead manually configure it. Doing so only for http/https/ftp allowed me to access the feed because Firefox then handled the feed:// URL directly (which ended up with it redirecting to http:// like I wanted).

To configure your proxy settings directly, you'll need to go to Edit -> Preferences -> Advanced -> Settings (next to "Connection"). Use manual settings. You'll have to determine the proxy settings that your system is already using.

Note that the missing colon (mentioned by Piet) is not a bug on your site. It's a conversion that the Firefox subscribe is doing. Also note that it is not a problem caused by a relative URL as Julien suggests. Firefox is converting it to an absolute URL, but then removing the colon in the http:// protocol prefix so that it can be appended to "feed://" (changing the protocol and supplying the original absolute URL as the "URL" for the new "feed" protocol).

like image 105
Jeremy Thomerson Avatar answered Sep 29 '22 19:09

Jeremy Thomerson