Open Bug 1009251 Opened 12 years ago Updated 3 years ago

I can't dynamically remove a page's RSS link effectively

Categories

(Firefox :: Toolbars and Customization, defect)

29 Branch
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: alex.karelas, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release) Build ID: 20140428193813 Steps to reproduce: I created a page with JavaScript (jQuery) that would add a <link rel="alternate" type="application/rss+xml" title="RSS" href="http://elgg.org/pg/thewire/?view=rss" /> element inside <head>, and would then remove it. Actual results: The <link> was indeed added and then removed from the DOM, but my browser's RSS button remained clickable. Expected results: The browser's RSS button should become disabled again. This is a problem in my Single-Page Application, where each "page" is linked to an RSS feed. Right now, I can only constantly add feeds to the RSS button, but never remove any. So when I click on my browser's RSS button, I get a menu with many RSS feeds (from the previous URL I visited in my SPA).
What's the underlying usecase of first adding and then removing it? How would you "remove" it exactly? Missing clear steps for a testcase...
Usecase is that on my website, when the user hops from one URL to another, he wants the browser's RSS button to link to a different RSS feed. Hence I would have to remove the <link> that was in the <head> and add a new <link>. Here's how I added and removed the <link> element (with jQuery): $('head').append('<link id="rss_link" rel="alternate" type="application/rss+xml" title="RSS" href="http://elgg.org/pg/thewire/?view=rss" />'); $('#rss_link').remove();
Indeed, I only tested adding and immediately removing. The same behaviour should happen, though, shouldn't it?
I just tested adding a <link>, and removing it (with the method described) only after 5 seconds passed, by typing the above two commands in the browser's console. After doing it, the RSS button remained enabled. I believe it should have been disabled.
Component: Untriaged → Toolbars and Customization
Also, if I remove and add an RSS <link> element repeatedly, the RSS button (which is enabled) pops up when I press it, to display a menu of all the RSS links, most of which I have already deleted.
Andreas Klapper, I'm sorry that I wasn't 100% clear about my usecase. The underlying usecase is this: A SPA (single-page App) website (in particular, it's https://www.perlmodules.net/ ) which has a different RSS feed associated with each different URL. So if a user surfs from URL to URL on my website, they should be able to see/have a different RSS feed associated with it each time. Right now, I'm not getting this clean behaviour from Firefox. Because I'm not getting a full-page reload. I'm programmatically adding and removing RSS links to my DOM.
How can it be that my messages are not getting any replies? Is noone listening??
Alex: What kind of reply do you expect? I don't see any questions. (In general, someone would reply if someone has time and interest to take a look at this ticket. That could be you or anyone else.)
Andre: I was expecting something of the sort: "We will do it, I confirm, it's a bug", or "We will not do it because this and this reason". This bug affects my site, and I believe affects any SPA site that has different RSS feeds on different pages. I think that's important.
I cannot offer RSS feeds in the <head></head> section because of this bug.
Everybody is welcome to investigate the code base and provide a patch, as usual. Your patch is welcome.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.