Link to RSS/Atom feed, relative, doesn't work in Firefox
Posted
by
Adrian Smith
on Stack Overflow
See other posts from Stack Overflow
or by Adrian Smith
Published on 2010-12-14T11:46:09Z
Indexed on
2011/01/07
13:53 UTC
Read the original article
Hit count: 387
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.
© Stack Overflow or respective owner