aureliendavid / rsspreview

WebExtension to preview RSS feeds in the browser
MIT License
99 stars 6 forks source link

Some feeds recognized but preview unavailable #64

Closed konjski-tramvaj closed 1 year ago

konjski-tramvaj commented 3 years ago

Hi on some web pages like for example: https://resource.dopus.com/latest RSS feeds are properly recognized but when trying to preview them only option to download "posts.rss" file is available.

What could be the issue here and can support for those links be added in future version?

aureliendavid commented 3 years ago

hi

it does work for me, when visiting https://resource.dopus.com/posts.rss the preview opens (instead of asking to download posts.rss)

one thing that can cause this for you is if this url is cached on your browser, the trick to open the preview in the browser instead of downloading the file won't trigger

you can try to clean the cache for this site for example, or check in the network dev tool if the request is cached

konjski-tramvaj commented 3 years ago

hi

it does work for me, when visiting https://resource.dopus.com/posts.rss the preview opens (instead of asking to download posts.rss)

one thing that can cause this for you is if this url is cached on your browser, the trick to open the preview in the browser instead of downloading the file won't trigger

you can try to clean the cache for this site for example, or check in the network dev tool if the request is cached

Have tried all above suggested and in different versions of ffox also clean install, really don't know.. will try to find out and report back. Thanks for the tips!

Draky50110 commented 2 years ago

Hello.

Found another RSS trying to download : https://actualitte.com/rss-main.rss (from https://www.actualitte.com and RSS icon at the bottom of the page).

For information, I succeed to preview the one of the main post above... but not this one.

aureliendavid commented 2 years ago

Hi,

Thanks for the report, I was able to find the common trait between the two reports to confirm the issue, unfortunately I don't have a fix for now.

For the record, the problem comes from sites that use a service worker to load their pages.

The way rsspreview currently works to force displaying feeds instead of downloading them is to intercept the web request and change the content-type header to something that firefox can display (text/xml).

However when sites use a service worker, the request is not processed directly by the browser and this trick doesn't work (I'm not sure why at this point).

The reason the problem doesn't occur for some people on one or the other of the reported cases, is that the service worker is only installed when you visit the main site (actualitte.com or dopus.com), after that further requests to the rss feed will go through the service worker and won't display.

To confirm that this is the problem it can be tested by:

I don't have a solution yet for this problem, I'll be looking into it, if someone knows about these things I'm open to suggestions.

Draky50110 commented 2 years ago

Thanks a lot for investigating :)

Shame on Mozilla for having removed this...

aureliendavid commented 2 years ago

I may have a workaround to load requests from service workers in a different way, it works for actualitte.com but not for dofus.com

If it only applies to this specific site it's not worth releasing, but if there are more similar cases out there I may include it in a future release.

So feel free to report any other case where the feed is downloaded instead of displayed


Another kind of workaround would be to make downloaded .rss files open with firefox and the preview will be displayed on the file instead of on the url.

This can be done by:

Jon-guy30 commented 1 year ago

This extension doesn't recognize the ffmpeg RSS feed either, it wants to download it. I can't add the ffmpeg.org rss feed to my reader of choice in order to follow new releases.

aureliendavid commented 1 year ago

Hi,

thanks for the report

you're right, this is because ffmpeg apparently serves its feed with the content-type application/x-rss+xml which I hadn't seen before (most feed are application/rss+xml or application/xml)

I've added support for it in v3.20 which in now active on AMO (you may need to clear some cache to have it working)

let me know if it works for you

Jon-guy30 commented 1 year ago

It loads perfectly now, thanks!