-4

I'm coding a RSS feed reader that shows push notification each time the feed updates.

How can I do an If-modified-since request to the news site?

Zoe stands with Ukraine
  • 25,310
  • 18
  • 114
  • 149
  • You can't do that. But what you definitely can do is to store the last modify date of your last fetch, and you can use a HTTP HEAD request to check that your feed is modified or not since your last download. – m4gic Sep 01 '18 at 10:18

1 Answers1

0

You can add an "If-modified-since" header to the HTTP GET request. For more information:

But note there are some caveats:

  • The server may simply not implement this feature.
  • The server may not record a "last modified" time for the resource you are attempting to GET.
  • The server's clock may be skewed ....
Community
  • 1
  • 1
Stephen C
  • 669,072
  • 92
  • 771
  • 1,162