Page 1 of 1

ETag implementation using libEspHttpd

Posted: Wed Mar 04, 2020 10:23 am
by Deepak saini
Hi Team,
I wanted to implement ETag web caching feature. The http library I am using is libesphttpd. I have read about web caching fundamentals from internet. But I can't able to understand where to start this Etag implementation using this library.

Please help me in this regards..

Regards
Deepak

Re: ETag implementation using libEspHttpd

Posted: Sat Mar 07, 2020 11:49 am
by PeterR
I have not used libEspHttp/ETag before but RTFM suggests that ETag is a simple header with a key value which you updated when you webpage changes (not sure why this helps, MQTT/Websockets could handle dynamic content). Try:

Code: Select all

httpdHeader(connData, HeaderKey, HeaderValue);