Does anyone know the best way to ensure that the client will not cache the page at all, to ensure all pages will be freshly loaded from the server on each request? I seem to remember some kind of pragma no-cache header or something, but i don't see direct reference for how to do that with allegroserve...
Thanks,
-dave
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, following up on my own post: I looked at the http 1.1 specification, and apparently one should do the following between with-http-response and with-http-body, to prevent all caching:
Does anyone know the best way to ensure that the client will not cache the page at all, to ensure all pages will be freshly loaded from the server on each request? I seem to remember some kind of pragma no-cache header or something, but i don't see direct reference for how to do that with allegroserve...
Thanks,
-dave
Ok, following up on my own post: I looked at the http 1.1 specification, and apparently one should do the following between with-http-response and with-http-body, to prevent all caching:
(with-http-response (req ent)
...
(setf (reply-header-slot-value req :cache-control)
"no-cache")
(setf (reply-header-slot-value req :pragma)
"no-cache")
...
(with-http-body (req ent)
... ))
The "pragma: no-cache" is for backward compatibility with http 1.0 clients - the new way is "cache-control: no-cache."
-dave