Hi, Im developing a firefox exrtention which can get weather alerts from various rss feeds and display them in a popup panel.
So, I need to know how rss reader know that rss feed has updated?
Do I have to check it using a timer?

thanx in advance!

The RSS specification includes a Time To Live (<ttl>) element, which is an optional sub-element of <channel>, indicating the time in minutes that "a channel can be cached before refreshing from the source".

This is the best clue you have as to the period your FF extension should use between updates. It is considered unfriendly to re-request at shorter intervals and some servers will block such requests, based on IP address.

As TTLs can be large (a day or more), your extension should cache all
channels in such a way that the cached feed can span user-sessions (ie by writing to hard disk not just using RAM).

If your "extension" is in Javascript, then you have no choice other than to use cookies, which may bring you up against cookie size limitations. For this reason, most RSS clients are not written in Javascript - but by all means try. I wrote mine in PHP running as a "proxy" - sitting between client and RSS server. All caching was performed by PHP at server level, with javascript used for no more than managing the user interface.

Airshow

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.