Hi Amos and Henrik
Thank you for your reply.
I did the following tests:
snprintf(buf, 128, "Cache-Control: no-cache;");
//also snprintf(buf, 128, "Cache-Control: no-cache max-age=1 no-store;");
//also snprintf(buf, 128, "Cache-Control: no-cache, max-age=1, no-store;");
//also snprintf(buf, 128, "Cache-Control: no-cache; max-age=1; no-store;");
buf[127] = '\0';
ci_request_add_xheader(req, buf);
//with or without snprintf(buf, 128, "Expires: Thu, 01 Dec 1994 16:00:00 GMT;");
//with or without buf[127] = '\0';
//with or without ci_request_add_xheader(req, buf);
For all above options I selected my custom web page is still kept displaying .
I must be wrong!
Any suggestion.
Thank you again!
Forrest
>Ah, it looks like you are slightly misunderstanding the BNF descriptions
>in the RFC. Only text bounded by "" is meant as exact. The rest is BNF
>syntax and 'variables'.
>So 'cache-request-directive' and 'cache-response-directive' are not meant
>to be actually in the header.
>That should be:
> "Cache-Control: no-cache;"
>probably "Cache-Control: no-cache max-age=1 no-store;" to cover all the
>bases.
Henrik Nordstrom-5 wrote:
On mån, 2007-10-01 at 09:28 +1300, Amos Jeffries wrote:
> Apparently "Expires: -1;" is invalid. Better to use an explicit timestamp,
> even if its Jan 1970, just to be sure that it works as expected.
-1 is invalid, which by specifications means expired in the past. See
RFC2616 14.21 Expires.
But yes, it's better to use a correct date as the messages you send
should comply with specifications, not just make the receiver do what
you intended..
Regards
Henrik