O'Reilly logo

Mastering Internet of Things by Peter Waher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Optimizing requests

Other headers can be used to optimize HTTP performance. HTTP supports conditional requests. Conditional requests are typically used together with some form of cache or previous knowledge of a resource. You can use the If- headers to perform actions, such as getting a resource if it is newer (Last-Modified) or different (ETag) from the resource you already have. You can upload new content only if you have a newer (Last-Modified) or different (ETag) version:

Header

Description

Expect

Can be used to break a Request/Response into two requests/responses. First, only the header of the request is sent, and secondly, only the content, and only if the server is ready to accept it. While this might be counter-intuitive ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required