in reply to Which feed method?

Another question, where should I store the last modified time? Whenever feed/page load, I will need to check and compare if last modified time changes. My current thought would be store in browser cookie. Is there any other better options?

Replies are listed 'Best First'.
Re^2: Which feed method?
by Your Mother (Archbishop) on May 08, 2016 at 07:19 UTC

    …Mmmmmmaybe… not? Could you describe your whole problem? If you are monitoring feeds on your own server there are probably better ways than to get browsers involved.

      Sir, please suggest. I could only think of either store in file (which I think is not a good options as I will need to open read it every time just to compare), another is store in browser cookie.

      I'm open for any suggestions. This is my first time working on feeds. My entire site were load by perl, and of course I can do read file or read cookie for further decision making before entire page print out. Or I can use ajax if not entire page reload.

        A cookie is a file that you'll need to open (even implicitly). You might as well use your own file, which gives you somewhat better control.
Re^2: Which feed method?
by RonW (Parson) on May 10, 2016 at 19:04 UTC

    An RSS feed is carried over HTTP. As such, it is expected that the client use the HTTP "if-modified-since" request header to indicate what it wants. Usually the time/date in this field is the same as the time/date in the "last-modified" response header the last time the same resource (file, or in your case, RSS feed) was received via HTTP.

    An RSS feed can be as simple as a file, for example, "feed.rss", updated as needed. In that case, the file can be served by an ordinary webserver and the value of the "last-modified" response header will be the modified time of the file.

    Or, an RSS feed can be generated on demand. In that case, the "last-modified" response header will often be the time of generattion. It could also be the time of the most recent item the feed generator is tracking.

    Either way, the RSS client can specify what it last "saw" using the "if-modified-since" request header. The webserver or feed generator can then act accordingly.

      Thanks RonW, that gives me clearer view about feeds.