My implementations are in PHP, but they could easily be adapted to other languages. I was surprised when I found that cURL really doesnt have support for this. Yeah, you can do something like this:
but its of limited usefulness. What you need is a cache storing all the requests youve made, so that the next time you make a request the cache can be checked. Without the cache its pointless. Also a problem is that some sites only return Last-Modified, not ETag:
https://cup.github.io/autumn/talk-conditional-request
My implementations are in PHP, but they could easily be adapted to other languages. I was surprised when I found that cURL really doesnt have support for this. Yeah, you can do something like this:
but its of limited usefulness. What you need is a cache storing all the requests youve made, so that the next time you make a request the cache can be checked. Without the cache its pointless. Also a problem is that some sites only return Last-Modified, not ETag: and some dont return either:https://www.google.com