For pull, we will write out a local cache file containing server etag and pass that on when doing the subsequent pull. The server can base on that etag to determine if anything has changed.
But for push, there is no optimization. The client always send the document(s) over to server even if there is no change. We probably should calculate a hash or checksum of each document content and send those to server first and let server return what file(s) actually needs pushing.