title: How to return only the changed resources in a collection using REST
body: <p>Let's say I'm designing a REST API that should return a list of an authenticated user's contacts </p>
  
  <pre><code>e.g. /users/me/contacts
  </code></pre>
  
  <p>To improve performance I'll return an ETag and provide this in future GET requests in the If-None-Match header. Assuming nothing has changed then the API will return a Not-Modified response.</p>
  
  <p>However what happens when the list of contacts has changed? I don't want to return the entire collection again, just the new and modified items.</p>
  
  <p>I could send a HEAD request, compare ETags and then send a subsequent GET request for the new items but this seems a bit wasteful.</p>
  
  <p>I've just come across the If-Range header which looks like it might solve the issue but it seems to also require the Range header which is specified in bytes.</p>
  
  <p>Do you think the If-Range header is the way to go or am I missing something obvious?</p>